title: Python: httplib request() not working
body: <p>I'm having issues using httplib's request() method.  It's a really odd problem.  My code looks like this:</p>
  
  <pre><code>query = "/search.json?q=&amp;geocode=" + slat + "," + slong + "," + mline[2] + "km&amp;rpp=" + mline[3]
  conn = httplib.HTTPConnection("search.twitter.com")
  conn.request("GET", query) #request here
  r1 = conn.getresponse()
  preresult = r1.read()
  
  print preresult
  </code></pre>
  
  <p>So the problem is, nothing prints out.  <code>query</code> is made up of a ton of other strings concatenated.  What's really strange is if I set <code>query</code> equal to the actual value of the string (that is, actually set it equal to say, <code>"/search.json?q=&amp;geocode=27.5916,086.5640,100km&amp;rpp=2"</code> as opposed to tons of other strings concatenated), then it prints out as it should.  I got that value of <code>query</code> by doing <code>print query</code> after concatenation in the code above.  So to make things clear, the following works fine (using the value of <code>print query</code> from above):</p>
  
  <pre><code>query = "/search.json?q=&amp;geocode=27.5916,086.5640,100km&amp;rpp=2"
  conn = httplib.HTTPConnection("search.twitter.com")
  conn.request("GET", query) #request here
  r1 = conn.getresponse()
  preresult = r1.read()
  
  print preresult
  </code></pre>
  
  <p>The value of <code>query</code> should be identical in both implementations.  I checked <code>query</code>'s type in the 1st implementation to make sure it's a string.  But they give different results.  Any ideas?  Thanks!</p>