http

What does Cache-Control mean when a client uses it?

I thought I understood what the Http Header "Cache-Control: max-age=3600" meant but then I came across it in a client request as this: Cache-Control: max-age=0 I'm not entirely sure what this means from a client's perspective. Any insight would be great. Thanks ...

Uploading files through a HTTP POST in C++

I'm trying to send a file and other POST variables to a PHP script on my server. There are no good resources on Google and the code samples I've found don't work. Preferably without using cURL. ...

Force connection to close with HttpClient in WCF

We're using the HttpClient class from "Rest toolkit" for WCF ( http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=24644 ) to inteface a Rest-server we've created. The server currently always close the connection, regardless of the "connection" header (it is in developement, so that is ok for now). How can I tell the Ht...

Rest URL design - multiple resources in one http call

From what I understand, a good REST URL for getting a resource would look like this: /resource/{id} The problem I have is, that I often need to get a large number of resources at the same time and don't want to make a separate http call for each one of them. Is there a neat URL design that would cater for that or is this just not suit...

what does this configuration in apache mean?

Header append Vary User-Agent env=!dont-vary Can anyone give a detailed explanation for this? ...

What are the most common reasons for requests without referrer?

I have a service with a large share of requests with an empty value for HTTP_REFERER. I'd like to interpret this correctly and wonder about the most common reasons for that. I understand that HTTP_REFERER is an optional header field, but most browsers with default setting seem to send them. Common reasons I have found so far: proxie...

Persistent/keepalive HTTP with the PHP Curl library?

I'm using a simple PHP library to add documents to a SOLR index, via HTTP. There are 3 servers involved, currently: The PHP box running the indexing job A database box holding the data being indexed The solr box. At 80 documents/sec (out of 1 million docs), I'm noticing an unusually high interrupt rate on the network interfaces on...

What does HTTP/1.1 302 mean exactly?

Some article I read once said that it means jumping (from one URI to another), but I detected this "302" even when there was actually no jumping at all! ...

Is a site potentially not-logonable?

Hi, I'm having some problems logging on to a site via cURL (not just me but an outsourcer too). So I'm left wondering: Are some sites impossible to log onto via cURL? That's the question. Thx in advance for your replies! ...

HTTP Digest authenticating in PHP

I want to authenticate to another site using HTTP Digest authorization in PHP script. My function has as parameter just content of the WWW-Authenticate header and I want to generate correct response (Authorization header). I have found many examples that explain how to implement this the other way (browser authenticate to my script) but...

C# HTTP Request Parser

I've got a custom HTTP server written in C# which gives me the raw HTTP request... GET /ACTION=TEST HTTP/1.1 Host: localhost:8080 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.10) Gecko/2009042316 Firefox/3.0.10 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-gb,en;q=0....

HTTP GET with request body

I'm developing a new REST-full webservice for our application. When doing a GET on certain entities, clients can request the contents of the entity. If they want to add some parameters (for example sorting a list) they can add these parameters in the query string. Alternatively I want people to be able to specify these parameters in th...

Extracting IP from request in Python

I have a Pythonic HTTP server that is supposed to determine client's IP. How do I do that in Python? Is there any way to get the request headers and extract it from there? PS: I'm using WebPy. ...

How to post a file via HTTP post in vb.net

Hi all! Having a problem with sending a file via HTTP post in vb.net. I am trying to mimic the following HTML so the vb.net does the same thing. <form enctype="multipart/form-data" method="post" action="/cgi-bin/upload.cgi"> File to Upload: <input type="file" name="filename"/> <input type="submit" value="Upload" name="Submit"/> </form...

Alternative bodies for HTTP PUT

Dear list, I'm developing a REST-ful webservice, and I have a question about the HTTP PUT method. I want to allow people to submit content using a application/form-data request body. However, the default response will be in application/xml. Is this acceptable? Evert ...

IIS -> connector -> Tomcat (NTLM authentication)

Hi All, I wanted to get feedback on a potential setup and wanted to make sure it would likely work before embarking on this path. I want to use IIS in from of Tomcat to do NTLM authentication. There is a Web service running in tomcat that would get requests get forwarded to it by IIS. This service requires knowledge of the remote NT u...

Input type "hidden" vs text area

Hi, I'm having a weird issue with an input type hidden and was wondering if anyone has ever seen something like this before. I'm saving about 2MB of data to a hidden field, in a comma separated format, then I'm posting that data to a jsp that simply sets some headers (so the output is recognized as an excel file) and then echoes the dat...

How to recreate this PHP code in Python?

I've found a PHP script that lets me do what I asked in this SO question. I can use this just fine, but out of curiosity I'd like to recreate the following code in Python. I can of course use urllib2 to get the page, but I'm at a loss on how to handle the cookies since mechanize (tested with Python 2.5 and 2.6 on Windows and Python 2...

Encoding key-value pairs in an RSS feed's URL

I've noticed that most websites don't set up their RSS feed URLs to make use of encoded key-value pairs that let one create specific queries, like the following fictional example: http://stackoverflow.com/feeds?tag=python&amp;lang=en&amp;minvotes=2 Is there a particular technical reason for this? Or am I just not finding the RSS feeds...

Map virtual directory to another web server in apache

Is it possible to configure Apache web server to map a directory to a path on another web server? For example, can I make requests for http://server1/resource/ return http://server2/resource/. If this is possible, how do I go about setting this up? ...