http-headers

in IE, the "X-Requested-With" header of jquery becomes "x-requested-with" (lowercase)

Why it is converting to lowercase? In Firefox it goes as: "X-Requested-With". While in IE, it goes as: "x-requested-with" ...

Representing Date in http header using QDateTime

HI, Date in http header is represented according to RFC 822 (As Updated by RFC 1123), like Wed, 15 Jul 2009 12:16:22 GMT. Able to represent in QDateTime using QDateTime testDate = QDateTime::fromString("Wed, 15 Jul 2009 12:16:22","ddd, dd MMM yyyy HH:mm:ss"); but without the timezone, wants to represent server time in UTC. Is it po...

Classic ASP: Get "Authorization" Header

I've been searching for a solution on the internet for this, and can not find it anywhere. I've setup a simple POST request through Fiddler for an ASP page on my local machine: Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwav...

ASP.NET MVC: OutputCache and http headers

Hi guys I have just started using OutputCache on some of my controller actions and I am not quite getting the response I would expect. I have set the cache time to 5 minutes and the Expires header is coming up the same as the Last-Modified header which is the time that the request was made. This is the header I am currently getting: ...

ASP.NET: httpwebrequest date header workaround

I'm trying to integrate with an API that requires the "Date" header in a web request. As you may well know, .NET has removed the ability to append or even display a default Date header in your request, so I was wondering about a workaround. Here's the catch: you can't use TCPClients because I don't have "permissions" on my server for su...

Bug in: System.Web.UI.Page.InitOutputCache() or in System.Web.Mvc???

Hi guys I'm using asp.net MVC with output caching (the OutputCache attribute) on some of my controller methods and am getting some really weird results in the HTTP headers. When I add the attribute to the controller action that handles the main page view. the following header is produced: Date Thu, 16 Jul 2009 23:0...

How do I fake an specific browser client when using Java's Net library?

A small program of mine just broke because, it seems, the site I was programmatically browsing now assumes a Java request comes from a mobile phone, and the link I was looking for is not on their mobile page. So I want to fake an Internet Explorer access. How do I do that with java.net? ...

PHP process HTTP headers

How do I obtain the HTTP headers in response to a POST request I made with PHP? ...

What is expire header and how to achive them in ASP.NET and PHP?

Today I have checked performance statistics of my website using YSlow. I got a warning (or error may be) which is as below Add Expires headers There are 15 static components without a far-future expiration date. * (no expires) http://www.example.com/video/css/global.css * (no expires) http://www.example.com/video/js/global.js ...

Testing HTTP Basic Auth in Rails 2.2+

As part of an API I am building, there is a user authentication method which upon success, returns a payload of useful user information, API token, etc. In writing functional tests for the controller that handles this, I am running in to an issue testing HTTP Basic auth; I have found numerous blogs that mention the following code should...

How can I set the Cache-Control header for every response in Catalyst?

It seems that by default Catalyst does not output Cache-Control:, etc. headers. I know I can output them in a given controller method like this: $c->response->headers->last_modified(time); $c->response->headers->expires(time + $self->{cache_time}); $c->response->headers->header(cache_control => "public, max-age=$self->{cache_time}"); ...

HTTP 1xx Status Codes

Hi there! Does anyone of you has ever seen a real life occurence of the HTTP "Expect" header? Or any proxy or server answering with a "100 Continue"-Status Message? Do popular HTTP servers like IIS or Apache ever encounter situations where a "100 Continue" is returned? Thanks, Max ...

received HTTP headers incorrect/unexpected for XSL file type

I'm using PHP+curl to retrieve an XSL file, but first I want to do some minimum validation that the file is really a XSL file. I make sure the file exists, has status code 200 OK, and that it has the correct file extension, but then I want to check the header for the Content-Type. I do this using curl_getinfo() function. All fine. But...

Possible to do "relative" Expires HTTP headers?

For example, I want my static files to expire 7 days after they're first downloaded. What should I set the Expires header value to be? ...

What is the most reliable way to determine the OS of a visitor to a web site?

What is the most reliable way to determine the OS of a visitor to a web site? All other things being equal I prefer an easier to integrate solution. I'm not attempting to gather analytics and I understand there is no completely reliable method. The purpose of this is to subtlely tailor the user experience in ways that do not affect the f...

Modify Page Head in User Control

How can I modify the head portion of a page from within an embeded user control? I know I can have the control run in the head portion of the .aspx page but I have a existing site with numerous pages that I don't want to change. One thing they all have in common is the menubar.ascx. So, I figured I could put the code there to modify t...

PHP script to download file not working in IE

I have a script that takes a key from $_GET['key'] , looks up the location in a database and uses the readfile together with some headers to present a download for the use. This works in Firefox but not IE8, haven't been able to test it on another IE. I get the following error in IE: "Internet Explorer cannot download download.php from w...

Alternative to Content-Disposition in HTTP Header (c#)

Is there an alternative for Content-Disposition with "attachment; filename=..."? I'm sending a streamed on the fly exe file and wish the browser to open the "save as" or "run" when I begin sending. I'm using the C# HttpResponseHeader and wish to use its members or the HttpWorkerRequest members. Thanks, Moshe ...

content-disposition alternative? c#

Question about c# ASP.Net server side code: Using c# ASP.Net 3.5 for on the fly created file ContentType = "application/save" File extension is exe I want the browser to open the save/run . I'm doing a resumed download using string contentRange = string.Format("bytes {0}-{1}/{2}", lastRange, fullSize - 1, fullSize); Response.Ad...

Modifying the HTTP headers client-side with JavaScript

Is it possible to use JavaScript to dynamically change the HTTP Headers received when loading an image from an external source? I'm trying to control the caching of the image (Expires, Max-Age, etc...) client-side since I do not have access to the server. ...