473,578 Members | 3,150 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re: Retrieving http headers from HTTPConnection object

On Mon, Sep 1, 2008 at 1:06 PM, jorma kala <jj****@gmail.c omwrote:

when using httplib for http requests, like for example:
conn = httplib.HTTPCon nection("www.py thon.org")
conn.request("G ET", "/index.html")

Is it possible to retrieve the complete http request in string form :
GET /index.html HTTP/1.1
Host: www.python.org
User-Agent: ...
Accept: ...

I mean does the HTTPConnection object have a property that stores this ?
or is it retrievable by some other form?

Thanks a lot.
Looking at the code of HTTPConnection, all that goes through the
_output message (including, therefore, the putheaders) are appended to
the self._buffer list.


Marco Bizzarri
Sep 1 '08 #1
0 884

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: SPG | last post by:
Hi, I have a servlet application that I am trying to write a very basic load tester for. There application has several servlets, but all rely on the same session being used (IE: For logged in users etc). I am trying to write a little test app to test the workflow of the servlet application. The problem is I need to keep the same session...
by: Raaijmakers, Vincent (GE Infrastructure) | last post by:
Please tell me if this is true or not.. In a all my applications I used the old fashioned way of "POST" requests: params = urllib.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0}) headers = {"Content-type": "application/x-www-form-urlencoded"} conn = httplib.HTTPConnection("somelocation") conn.request("POST", "/cgi-bin/query", params, headers)...
by: John Reese | last post by:
Hello there. I've run into some missing functionality with HTTP Digest authentication in the 2.3 library and I was wondering if I'm just missing something. Missing functionality the first: urllib2 1a. You can add "handlers" to your opener indicating that you want to use HTTP Digest auth. This is nice way to handle it, but I don't see...
by: Eric Pederson | last post by:
I didn't come across any illuminating discussion via Google, thus my question here (though it may be a neophyte question.) I am interested in the workings under the hood of Python's access of "files". What is actually happening at the various stages when I create a file object and "read" it? (1) >>> f = file("C:/GuidosParrot.txt","r") ...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.