http-headers

HTTP Header - ntCoent-Length

I get the following HTTP response headers in a particular response. All looks okay. However I have noticed that the content-length appears twice... Content-Length: 2424 ntCoent-Length: 2424 Is there a particular reason why the content-length is returned a second time as ntCoent-Length? HTTP/1.0 200 OK Date: Wed, 26 May 2010 09:38:1...

How a web app identify if a click came from another web app via code?

Hi, we have a web application that users can take online reports from ou ERP system data... And we have another web application that is used by our teachers and employees. We can't change the ERP web app because its a closed DLL, in this case we made some extended functionality in our custom internal web app and we are willing to put t...

Rails gives wrong headers after upgrade 2.3.5 -> 2.3.8

I just upgraded from rails 2.3.5 to rails 2.3.8, but now my redirects are not working properly. I get the following as the response HTTP Headers: HTTP/1.1 302 Moved Temporarily Date: Wed, 02 Jun 2010 09:40:39 GMT Content-Length: 93 Content-Type: text/html whereas I got previous: HTTP/1.1 302 Moved Temporarily Connection: close Date:...

Ideal HTTP cache control headers for different types of resources

I want to find a minimal set of headers, that work with "all" caches and browsers (also when using HTTPS!) On my web site, I'll have three kinds of resources: (1) Forever cacheable (public / equal for all users) Example: 0A470E87CC58EE133616F402B5DDFE1C.cache.html (auto generated by GWT) These files are automatically assigned a new...

Changing HTTP header in Rails

I am trying to communicate with a RESTful service in Rails. It can return data in different formats, json and xml. Is there a specific way that I can get the data type that I want. The service mentions that ACCEPT needs to be set in HTTP header. I am not sure how to do that in Ruby. Currently I'm doing this for get response = Net::HTT...

Are your redirects HTTP compliant (absolute URI)?

In the Hypertext Transfer Protocol 1.1 spec, it states for the Location header: The field value consists of a single absolute URI. Location = "Location" ":" absoluteURI An example is: Location: http://www.w3.org/pub/WWW/People.html I have coded many an app that doesn't include the scheme and domain (i.e., /th...

X-Cache Header Explanation

I was going through the firefox local cache folder and found a lot of files containing the X-cache header. Can someone explain the purpose of this header ? thanks ...

Is there an up to date list of all common content types returned from web servers?

For intance, text/html, audio/mpeg, etc? Can I safely assume that anything that is text based will actually have text/??? as its content type in the header when the server returns the document? ...

ASP.net AppendHeader not working in ASP MVC

I'm having problems getting AppendHeader to work properly if I am also using an authorize filter. I'm using an actionfilter for my AJAX actions that applies Expires, Last-Modified, Cache-Control and Pragma (though while testing I have tried including it in the action method itself with no change in results). If I don't have an authorize...

Triggering CSV download using Javascript?

I have an url /reportcsv that generates a plain text csv with Content-type: text/csv and Content-disposition: attachment; filename=report.csv. I want trigger this csv to be downloaded using Javascript. I'm considering two methods: 1) Setting location.href = /reportcsv 2) Setting an iframe url to /reportcsv Both seem to work in Safari....

Can CFHEADER values be read by other code?

The code <cfheader name="Test" value="1"> <cfheader name="Test" value="2"> results in the header "Test: 2" being sent to the browser (as seen using HttpFox). Is there a way for the second line of code to determine if a header with the same name has already been written using CFHEADER? Thanks! ...

Forcing intranet users to view webpage in IE8 mode, not compatibility mode

Although I'm specifying <meta http-equiv="X-UA-Compatible" content="IE=8" /> But due to IE's "Display intranet sites in Compatibility View" setting, my app isn't being viewed in IE8, but in compatibility mode. Anyone know if there is a way round this??? ...

Can I use a MIME type declaration to get an HTML file to open in MS Word?

Bill James wrote: I was able to render an HTML page with the MIME type set to "application/msword", which caused the browser to spawn Word which imported the html just fine, allowing edits and saving just as if I'd output a real Word doc. That sounds great to me, but I haven't been able to get it to work in any browser (Chrome/FF/S...

Simple HTTP Framework and time issue

I'm using Simple Framework for my recent project, and there is a problem with the date headers generated by the system. I can get my local time from Date class correctly, but setDate method of Simple's Response class sets date in milliseconds and when i do that by calling System.currentTimeInMillis, dates in response headers are incorrec...

Missing http header in Ajax response

Hi SO I'm having an issue with some missing http headers in a Ajax response. The ajax-page (.NET) adds som additional info to the http header by using Me.Response.AddHeader("ResponseCode", mResponseCode). If I access the ajax-page directly and use httpAnalyser to check the headers, I can see that the headers are added correctly. But whe...

Help with header() php

Hello I want to refresh a script from the server when back button is pressed. For that, i'm using this code: header( "Last-Modified: " . gmdate( "D, j M Y H:i:s" ) . " GMT" ); header( "Expires: " . gmdate( "D, j M Y H:i:s", time() ) . " GMT" ); header( "Cache-Control: no-store, no-cache, must-revalidate" ); // HTTP/1.1 header( "Cache...

What are the X-StartTime and X-TimeStamp HTTP Header values?

I am writing an HTTP proxy to serve up an M-JPEG stream from an IP camera on the LAN. I noticed that it returns the HTTP header X-StartTime: 1276943417197. With each JPEG frame, it also includes a header like X-TimeStamp: 346024130. I was unable to find anything about these headers online, does anybody know what they are? ...

PHP Redirect Headers Best Practices

I'm creating a PHP CMS and have some system pages like a 404 page, a maintenance page, and an unauthorized access page. When Page A isn't found, the CMS will redirect to the 404 page; if the user doesn't have access to Page B, it will redirect to the unauthorized access page, etc. I'd like to use the proper status code in the header of...

Tamper with first line of URL request, in Firefox

I want to change first line of header, modifying the method and/or URL. The (excellent) Tamperdata firefox plugin allows a developer to modify the headers of a request, but not the URL itself. This latter part is what I want to be able to do. So something like... GET http://foo.com/?foo=foo HTTP/1.1 ... could become ... GET http://b...

ASP.NET WebService, I want to add some custom HTTP headers onto a ASP.Net web service

I want to add some custom HTTP headers onto a ASP.Net web service to allow cross site access. the result I need is something like this. i.e, HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length Access-Control-Allow-Origin: * Access-Control-Allow-Methods: GET, POST, OPTIONS Access-Control-Allow-Headers: X-Request...