http-headers

YUI ajax set http header for basic authorization

How do I set http header for basic authorization using YUI connection manager ? env: yui 2.8.1 ...

Content-Length header with HEAD requests?

The http spec says about the HEAD request: The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. The metainformation contained in the HTTP headers in response to a HEAD request SHOULD be identical to the information sent in response to a GET request. Should the response to a HEAD...

Does WSGI override `Content-Length` header?

HTTP HEAD requests should contain the Content-Length header as if they were GET requests. But if I set a Content-Length header it gets overridden by the WSGI environment (discussion related to mod_wsgi). Take a look at the following example: from wsgiref.simple_server import make_server def application(environ, start_response): st...

iphone - web service communication for mac => Required packet sniffing assitance

Hi All, I would like to see the HTTP request and response headers sent and received in my MAC. Is there any tool which can sniff the wireless data too. Kindly help. Wireshark didnt work out well for me as of now. ...

Android Http get Session Cookie

I didn't really want to post here as there is so much information on the net, but I've trawled the depths and can't figure it out. Ok so I can't get this to work in two scenario's hopefully the answer is the same for both. My problem is I set the request header but it doesn't seem to send it. I have a session id s=e32ff223fwefd3 , and...

Page Speed recognizes expiers headers, but YSlow doesn't

We're running IIS6 on Windows Server 2003. Our site is written in ASP.NET. We configured our site to expire headers after 7 days. While Page Speed gives us a check for "Leverage browser caching", YSlow gives us an F on "Add Expires headers". How can that be? An example page can be found here ...

Asian characters in IE 8 get garbled in Server; is this due to HTTP header Content-Type?

One of the request parameters in an http request made by the client contains Japanese characters. If I make this request in Firefox and look at the parameter as soon as it reaches the server by debugging in Eclipse, the characters look fine. If I do the same request using IE 8, the characters get garbled when I look at them at the same p...

How to emulate specific HTTP Headers with ASP.NET

I Have a specific set of HTTP response headers I'm trying to recreate in ASP.NET. Here is how it looks in Fiddler (Raw): HTTP/1.1 200 OK Content-Length: 570746 Content-Type: audio/wav Last-Modified: Wed, 19 May 2010 00:44:38 GMT Accept-Ranges: bytes ETag: "379d676ecf6ca1:3178" Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Date: Tue,...

header() problem in IE

I have a function for outputting documents, images etc: public function direct($theMimeType, $thePath) { header('Content-type: '.$theMimeType); ob_clean(); // clean output buffer flush(); // flush output buffer readfile($thePath); exit; } It works great in Firefox. The file opens whether it is PDF, DOCX or any oth...

Asp.net web service read custom header

cant read http custome header "MSISDN" from my web service ... same code works on regular asp.net page. Can anyone shade a light on that subject ? public CellulupResponse parseRequest(string requestString) { CellulupResponse response = new CellulupResponse(); UserIDType userType = UserIDType.MSISDN; // Get The HttpReq...

Adding a Http-Header in a HttpModule and read it out from a Page

I've tried to write my own HttpModule (IHttpModule) that adds a Header like that: public class MyModule: IHttpModule { public void Init(HttpApplication c) { c.BeginRequest += delegate{c.Response.AddHeader("MyHeader", "MyValue");}; } public void Dispose(){} } and tried to read in a aspx page like that: var x ...

How to append cookie value to end of response Location header with Apache?

I have a page that issues an HTTP redirect. I need to append the current session id (jsessionid) to the end of the HTTP redirect to pass this id as a GET parameter in the redirect. Can mod_header's Header append directive pick up a cookie value via SetEnvIf? Should a rewrite rather be involved? But mod_rewrite just rewrites the reque...

Apache (2.0) mod_headers not outputting environment variables?

My .htaccess file: Header add X-Hello "time %D" Now I check to see what it looks like, check out the X-Hello header: $curl -v http://foo.com/bar.php ... < HTTP/1.1 200 OK < Date: Wed, 06 Oct 2010 20:43:39 GMT < Server: Apache < Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 < Expires: Thu, 19 Nov 1981 0...

How to authenticate to webservice with curl?

I am trying to get curl to run a webservice for a site I am working with. The site requires a login. I tried using --user:password with curl, but to no avail. How do I find out how to authenticate with the site? ...

How to configure a proxy class for an ASP.NET web service for flexible deployment to production

I inherited a web app at the Visual Studio 2003 level that placed all of its code for accessing SQL server in an ASMX web service. This web project had a web reference to the web service. I needed to bring the whole thing under source control, upgrade it to Vstudio 2008 and make a bunch of fixes and enhancements. In doing this, I came ...

Get all Request headers in Django

I need to get all the Django request headers. From what i've read, Django simply dumps everything into the request.META variable along with a lot aof other data. What would be the best way to get all the headers that the client sent to my Django application? I'm going use these to build a httplib request. Thank you. ...

Passing parameters in the message header with a REST API

Hi, I'm developping a REST API and I need to tranport cryptograms to authenticate the message for each request in a applicative process (MAC encryption from secret keys). I was thinking about putting them in the message header to avoid adding non-data information in the message body which contains the posted/retrieved object (XML or JS...

Resource interpreted as document but transferred with MIME type text/css.

Resource interpreted as document but transferred with MIME type text/css This is the error that's showing up in Google Chrome Inspector. The file is: http://www.doanddare.org/css/style.css It is being rendered by a php processor. How can I fix this error? The headers being returned are: Request Headers Accept:application/xml,appli...

GAE & response caching

Good afternoon, I need that results of my Servlet always cached by browser. Trying to put the same headers like http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js but the results still do not come from the browser cache (tested with FireBug). My code: response.setContentType("text/javascript"); response.setHeader("Last-Modi...

Use server-side proxy to set expires header for static resources on another domain

I have a web app that links to several thumbnail images from another server on the same domain that I have no configuration control over. The page loads about about 2 to 2.5 mb worth of static images. I would really like to have the server owner set the expires header so the images don't re-download every single time, but unfortunately...