http

Using Mercurial, is there an easy way to diff my working copy with the tip file in the default remote repository

When using mercurial, I'd like to be able to diff the working copy of a file with the tip file in my default remote repository. Is there an easy way to do this? I know I can do an "hg incoming -p" to see the patch sets of changes coming in, but it'd be nice to just directly see the actual changes for a particular file that I'd get if I...

Java HttpURLConnection: Can it cope with duplicate header names?

I am debugging some code in the Selenium-rc proxy server. It seems the culprit is the HttpURLConnection object, whose interface for getting at the HTTP headers does not cope with duplicate header names, such as: Set-Cookie: foo=foo; Path=/ Set-Cookie: bar=bar; Path=/ The way of getting at the headers through the HttpURLConnection(usi...

Getting specific revision via http with VisualSVN Server

I'm using VisualSVN Server to host an SVN repo, and for some automation work, I'd like to be able to get specific versions via the http[s] layer. I can get the HEAD version simply via an http[s] request to the server (httpd?) - but is there any ability to specify the revision, perhaps as a query-string? I can't seem to find it... I don...

"Method Not Implemented" error - Firefox 3

Hi all Getting sporadic errors from users of a CMS; Ajax requests sometimes result in a "501 Method not implemented" response from the server. Not all the time; usually works. Application has been stable for months. Users seem to be getting it with Firefox 3. I've seen a couple references via Google to such problems being related to h...

Possible to detect the *type of mobile device* via javascript or HTTP Headers?

I've got a request from a customer to automatically detect the type of mobile device (not the browser, the type. ex: Moto Q, Blackjack II, etc.) and automatically select the device from a drop down with a list of supported devices. So far I've found that the HTTP Headers (submitted by mobile IE) contain information such as Resolution ...

How can I send an HTTP POST request to a server from Excel using VBA?

What VBA code is required to peform an HTTP POST from an Excel spreadsheet? Accepted Answer Note: For greater control over the HTTP request you can use "WinHttp.WinHttpRequest.5.1" in place of "MSXML2.ServerXMLHTTP" ...

How do you know if the HTTP Compression is Working?

How do you know if the HTTP Compression setup is working? Is there any tool I can use to see the compressed page before it is uncompressed by the browser? are there any tools to measure the amount compressed and response speed? ...

How do I prevent ServerXMLHTTP from automatically following redirects (HTTP 303 See Other responses)?

I am using ServerXMLHTTP to perform an HTTP POST. The response returned is a redirect (specifically 303 See Other). ServerXMLHTTP is automatically following this redirect but this is causing an authentication failure as is not propagating the Authorization header of the original request. Is there a way I can prevent the automatic redire...

Howto deactivate caching inside a jsp page

I understand there is a HTTP response header directive to disable page caching: Cache-Control:no-cache I can modify the header by "hand": <%response.addHeader("Cache-Control","no-cache");%> But is there a "nice" way to make the JSP interpreter return this header line in the server response? (I checked the <%@page ...%> directive....

How do I report an error midway through a chunked http repsonse without closing the connection?

I have an HTTP server that returns large bodies in response to POST requests (it is a SOAP server). These bodies are "streamed" via chunking. If I encounter an error midway through streaming the response how can I report that error to the client and still keep the connection open? The implementation uses a proprietary HTTP/SOAP stack so ...

Where can I find a List of Standard HTTP Header Values?

I'm looking for all the current standard header values a web server would generally receive. An example would be things like "what will the header look like when coming from a Mac running OS X Leopard and Camino installed?" or "what will the header look like when coming from Fedora 9 running Firefox 3.0.1 versus SuSe running Konqueror?"...

How to debug RESTful services?

I'm looking for an easy way to lightweight way to debug RESTful services. For example, most webapps can be debugged using your average web browser. Unfortunately that same browser won't allow me to test HTTP PUT, DELETE, and to a certain degree even HTTP POST. I am not looking to automate tests. I'd like to run new services through a qu...

Are the PUT, DELETE, HEAD, etc methods available in most web browsers?

I've seen a couple questions around here like How to debug RESTful services, which mentions: Unfortunately that same browser won't allow me to test HTTP PUT, DELETE, and to a certain degree even HTTP POST. I've also heard this, that browsers support only GET and POST, from some other sources like: http://www.packetizer.com/ws/res...

Change name of file sent to client?

I have a webpage that pulls information from a database, converts it to .csv format, and writes the file to the HTTPResponse. string csv = GetCSV(); Response.Clear(); Response.ContentType = "text/csv"; Response.Write(csv); This works fine, and the file is sent to the client with no problems. However, when the file is sent to the cl...

RESTifying URLs

At work here, we have a box serving XML feeds to business partners. Requests for our feeds are customized by specifying query string parameters and values. Some of these parameters are required, but many are not. For example, we've require all requests to specify a GUID to identify the partner, and a request can either be for a "get lat...

Parallel HTTP requests in PHP using PECL HTTP classes [Answer: HttpRequestPool class]

The HttpRequestPool class provides a solution. Many thanks to those who pointed this out. A brief tutorial can be found at: http://www.phptutorial.info/?HttpRequestPool-construct Problem I'd like to make concurrent/parallel/simultaneous HTTP requests in PHP. I'd like to avoid consecutive requests as: a set of requests will take...

What is the default time after which an HTTP request is deemed to have timed out?

For PHP, what is the default time after which an HTTP request is deemed to have timed out? I'm using the PECL HTTP extension to make HTTP requests. I can set a timeout limit when making a request, however I'd like to know what the default is if nothing is explicitly specified. I've hunted through the PHP manual to no avail. I'd apprec...

Sensible HTTP POST timeout values to use when programmatically issuing requests?

When programmatically issuing HTTP POST requests, what timeout values would be sensible? In my case, I'm looking to set 'sensible' timeout values when making POST requests in PHP, however this applies to any language. I need to be able to issue a set of requests, each to a user-specified URL. If I do need to process requests consecutiv...

What is the canonical way to determine commandline vs. http execution of a PHP script?

I have a PHP script that needs to determine if it's been executed via the command-line or via HTTP, primarily for output-formatting purposes. What's the canonical way of doing this? I had thought it was to inspect SERVER['argc'], but it turns out this is populated, even when using the 'Apache 2.0 Handler' server API. ...

C/C++ Web Server Library?

I'm looking for a well-written, flexible library written in C or C++ (I'm writing my apps in C++) that can be used to embed an relatively simple HTTP server into my applications. Ultimately I will use this for application monitoring and control. There are a number of great client-side libraries (e.g. libwww, neon, curl) but I'm struggl...