http-headers

How can I find out whether a server supports the Range header?

Hi I have been trying to stream audio from a particular point by using the Range header values but I always get the song right from the beginning. I am doing this through a program so am not sure whether the problem lies in my code or on the server. How can I find out whether the server supports the Range header param? Thanks. ...

HTTP Authentication in Python

Whats is the python urllib equivallent of curl -u username:password status="abcd" http://example.com/update.json I did this: handle = urllib2.Request(url) authheader = "Basic %s" % base64.encodestring('%s:%s' % (username, password)) handle.add_header("Authorization", authheader) Is there a better / simpler way? ...

securing a webpage without headers

I just read this article on tdwtf.com. Generally, it describes an archiving bot destroying things because it ignores headers. I then realized that I don't know how to do security in a page WITHOUT headers. Therefore my question is: What security measures can i take besides using headers? I develop mostly in php, so I'm familiar with he...

How can I reliably detect if Flash was the originator of a request to a service?

I need to be able to detect if flash was the originator of a request to an ASP.NET service. The reason being that Flash is unable to process SOAP messages when the response status code is something other than 200. However, I allow exception to bubble up through our SOAP web services and as a result the status code for a SOAP server fault...

WebResource.axd and HTTP Headers

Our site just moved from .NET 1.1 to .NET 3.5, and in the process updated our 3rd party server controls. One of these packages uses javascript provided via WebResource.axd. These are included as normal <script src="" /> tags. Watching the traffic, however, I see that these javascript files are coming across with headers that prevent cli...

Corrupted HTTP headers on Apache/Weblogic 9.2

I have a very strange problem. My application stack is J2EE based and uses Spring 2.5.6 with Spring webflow 2.0.6. The app server is Weblogic 9.2 with an Apache server in front (load balancing). We use SiteMinder Webagent as the authentication layer in apache. The problem below could be caused by any of the layers above - Our site pe...

Unit Testing HTTP-actions

I'm writing Yet Another PHP Framework, and now that I've coded a good deal of stuff, I'm starting to think about unit tests (yes, I know, bad form). Some actions make the framework to modify HTTP behavior, such as create cookies, redirect the browser. Another major feature is that the the visited URI can affect the way the framework sho...

capture details from external web page

Hi, I'm wondering if it's possible to capture details from the web page that a user previously visited, if my page was not linked from it? What I am trying to achieve is to allow users to my site to find a page they like while browsing the web, and then navigate to a page on my site via a bookmark, which will add the URL (and possibly ...

Give user a 404 if querystring is missing?

Say that I require a querystring; for example "itemid". If that querystring is for some reason missing, should I give the user a 200 error page or a "404 Not Found"? I would favour 404 but I'm not really sure. ...

Does the order of headers in an HTTP response ever matter?

Is it ever meaningful whether the order of headers is A: 1 B: 2 vs B:2 B:1 I'm trying to figure out if I can use a dictionary to store a list of headers or if it needs to be some kind of list or ordered dictionary. ...

Force the browser to cache a request to a Castle MonoRail action?

In our project, we have a whole bunch of small css/js files, so when we build views we find ourselves writing many <link> or <script> tags, forcing the browser to make many requests for our css/js content. To remedy this, we started looking for a way for server to shore that all up into one request that dumps every css file or every js ...

Check whether content already sent in PHP

Is there a smart way to check whether output has already been sent to the browser and sending a header would generate a PHP_WARNING? Obviously there's the alternative of using an output buffer, but that's not always an option. ...

Send headers along in python

I have the following python script and I would like to send "fake" header information along so that my application acts as if it is firefox. How could I do that? import urllib, urllib2, cookielib username = '****' password = '****' login_user = urllib.urlencode({'password' : password, 'username' : username}) jar = cookielib.FileCoo...

PHP / Curl: HEAD Request takes a long time on some sites

I have simple code that does a head request for a URL and then prints the response headers. I've noticed that on some sites, this can take a long time to complete. For example, requesting http://www.arstechnica.com takes about two minutes. I've tried the same request using another web site that does the same basic task, and it comes bac...

How to see request in fiddler to my site and from my site iis 5

Hi i have webserver on windows xp iis 5 sp3. I see logs but thre are only url to my site. But i need see all request informations(headers an body) For example I go to GMAIl and i click search rss feed(i add my own rss) And gmail need send request to my own webserver 13:01:05 74.125.16.68 GET /9.rss 200 (it send request and i saw log). I ...

How to customize Last-Modified Header in Joomla?

Even in the latest Joomla 1.5 Last-Modified Header is non-customizable and returns current date, which is imho against seo-basics. Does any one know how (or component) to make Joomla 1.5 return Last-Modified header based on last modified article? ...

How does Google Analytics determine the date and time of an event?

I am trying to figure out just how Google Analytics logs the actual time of an event such as a visit or a click. Does it use the time being passed by the HTTP request, the date in the HTTP Header, or the date it actually receives the request ? The reason why I am asking is because I am developing an app where there MAY be some times ...

Examine http response headers in IE8

I'm looking for an ie8-addon that displays the http headers like firebug or httpliveheaders do. Any advice is appreciated. edit: I may be blind but it seems as if the built-in developer tools (F12) do not show the http headers. ...

Tool to view response headers

What is the best way to view the HTTP response headers from a request against a particular URL? Telnet or is there some other really good command or tool? ...

When to send HTTP status code?

Currently in my PHP scripts, I redirect the user to a custom 404 not found error page when he/she tries to access content that doesn't exist or doesn't belong to that user. Like so: header('Location: http://www.mydomain.com/error/notfound/'); exit; I realize the above header() call sends a 302 redirect status code by default. What I ...