I am wondering if there exists a tool to send HTTP requests with given headers only.
I need this to test some application and want to observe the behavior of the application when some HTTP headers are missing.
Researched urllib2, httplib and pycurl but they add their own headers internally (in the best case, we can specify the value of these headers or make those values empty).
What I need is an utility where I have complete/transparent control of the HTTP headers I want to send in a request (so that I can send requests with missing content-length/content-type and so on) and the application just forms a request with these headers ONLY, without adding anything else internally.
I am able to do this with browser plugins.
As abartnert points out, you can just use a socket for this if you’d like, but I think it’s worth noting that CURL does what you require as well. From the man page at http://curl.haxx.se/docs/manpage.html :