http

Raw HTTP Response shown in browser instead of being rendered

Hello there, we're facing a weird and seemingly randomly appearing problem where the browser renders the complete, raw HTTP response (to a GET request) including all headers and the compressed content as text instead of just using the contents and rendering it. This happens for whole page loads as well as postbacks as well as page loads...

Apache find the sender of get request

What's the easiest way to find the sender of a get request from apache? I keep seeing error logs that imply some page/application is sending a get request for a favicon file, which is nonexistent. I grep'd my entire webhost directory but not a single file in there is referencing this nonexistent favicon file. Is there a way to find out...

Is basic access authentication secure?

Using Apache, it is quite simple to set up a page that uses basic access authentication to prompt a user for a name/password and use those credentials in some way to grant access to that user. Is this secure, assuming the connection between the client and server is secure? ...

How to use same cookies in multiple request in python?

I am using this code: def req(url, postfields): proxy_support = urllib2.ProxyHandler({"http" : "127.0.0.1:8118"}) opener = urllib2.build_opener(proxy_support) opener.addheaders = [('User-agent', 'Mozilla/5.0')] return opener.open(url).read() To make a simple http get request (using tor as proxy). Now I would like to ...

How can I read a server log file?

I set up an httpd server in linux mandriva 2010. How can I find the server log file? Do I have to write that log file? I'm a new bee in this area. Any suggestion will be appreciated. Thanks in advance. ...

Sending HTTP POST Request In Java....

lets assume this URL... http://www.example.com/page.php?id=10 (Here id is no GET its POST Request...) now here i wanna send the the id = 10...to the server's page page.php because it is POST method i m not able to send this like /page.php?id=10... how can i do this in java.... i did this : URL aaa = new URL("http://www...

How to get the headers from the last redirect with PHP's curl functions?

If I execute a cURL request that is set to follow redirects and return the headers, it returns the headers for ALL of the redirects. I only want the last header returned (and the content body). How do I achieve that? ...

Really weird Cookie header behaviour? - Cookies

Hi folks, I'm using Firefox 3.6.8 for these tests. I'm setting a cookie within the response headers of my web app using: Set-Cookie: session=7878dfdsfjsdf89sd89f8df9 This does not seem to override the session Cookie. When a request is performed instead Firefox even sends duplicate cookies: Cookie: session=7d75cd8f55895cbccb0d31e...

Cache javascript & css on user's browser and load new one when changes are made

Hi, this question might be available online but sorry that I cant find a solution that I understand. Can someone pls help me? The situation is this, I would like users' browser to cache external .css and .js files. However, each time I made changes, I would want user's browser be able to load the updated external files instead of using ...

How do multiple clients connect simultaneously to one port, say 80, on a server?

Hi I understand the basics of how ports work. However, what I don't get is how multiple clients can simultaneously connect to say port 80. I know each client has a unique (for their machine) port. Does the server reply back from an available port to the client, and simply state the reply came from 80? How does this work? ...

HTTP method to represent "fire and forget" actions in RESTful service

Thinking about REST, it's relatively easy to map HTTP methods to CRUD actions: POST for create, GET for read, etc. But what about "fire and forget" actions? What HTTP method would best represent a fire and forget action such as triggering a batch job (in which no response is sent back to the caller)? POST would spring to mind, but I th...

IFrame Comet response contains no data

Hi. I'm experimenting with Comet and I'm stuck with implementing it via a hidden IFrame ("forever frame". This is my index.html: <!DOCTYPE HTML> <html> <head> <script type="text/javascript"> cometResponse = function() { var debugOut = document.getElementById('debugOutput'); return function(response) { ...

How to get IP of server that initiated redirect

Hi, I hope you could help me with the following question: A user clicks a hyperlink in a page. Server A handles the request and redirects the client to a URL on Server B (more specifically I am using the Response.Redirect method in .NET on server A). I have been asked to restrict access to Server B to redirects originating from Server...

Safe file upload without https (ssl layer)

Hello, I'm PHP developer and I know very little when it comes to https/ssl, but I would like to offer my client safest possible way of uploading file to webpage (i.e. webftp as part of client service on page). Which way should I look? Thank you in advance, I will clarify my question if needed. ...

GET request from a PHP script in a limited environment...

I have to run a get request from a PHP script, but I'm in a fairly limited environment (tight firewalls, can't modify the PHP install, etc...). fsockopen() returns an error and http_get() seems to not be installed. The only other way I know of is to call file_get_contents(), which works OK, except for the fact that I need to set the re...

Show Unfriendly HTTP 500 Error in Visual Studio

Hey everyone I am writing an app that posts XML to a webservice and am constantly greeted with a WebException claiming a HTTP 500 error on the server. Is there anyway to see the specifics of the error akin to the "unfriendly" error messages in Internet Explorer? The "See details" button doesn't seem to list the exact server response I...

Need help adding Expires headers

Hello everybody, So basically I've ran my site through ySlow and it has informed me that I should add Expires headers to some of the elements on my page to help with the caching. The page is mainly static content currently hosted on an Apache/2 server. If it helps at all the site is here. I'm not really sure how you alter the HTTP i...

detecting server crash during long-polling http request

I have a Java client that uses HttpClient to connect to a server and wait a response. The response may return after a long time (the client essentially waits for an event from the server). Other than using timeouts, is there a way to detect when the server crashes? ...

Python's `urllib2`: Why do I get error 403 when I `urlopen` a Wikipedia page?

I have a strange bug when trying to urlopen a certain page from Wikipedia. This is the page: http://en.wikipedia.org/wiki/OpenCola_(drink) This is the shell session: >>> f = urllib2.urlopen('http://en.wikipedia.org/wiki/OpenCola_(drink)') Traceback (most recent call last): File "C:\Program Files\Wing IDE 4.0\src\debug\tserver\_sandb...

cache-control no-cache mechanism (lowest common denominator behaviour in a sea of badly implemeneted legacy proxies)

I'm working on a Kerberos style cookie-based authentication mechanism for static files for the Nginx web-server (the cookie contains an encrypted string which much match with a sub-string in the URL, the sub-string is specified by a regular expression). The system does not require MITM security, and if it will we will probably just enabl...