.Net's implementation of HTTP is ... problematic. Beyond some issues in compliance with HTTP/1.0, what's bugging me right now is that HttpWebResponse.GetResponse() with ReadTimeout and Timeout set to 5000 blocks for about 20 seconds before failing (the problem is it should fail after 5 seconds, but it actually takes 20 seconds).
I need ...
I'm using the following code to make sure all certificates pass, even invalid ones, but I would like to know if there is a better way, as this event gets called globally and I only want the certificate to pass for a certain HTTP call and not for any others that are happening asynchronously.
// This delegate makes sure that non-validatin...
I want to be able to send an HTTP request to "admin.foo.com", but have the request go to an IP which does not map to "admin.foo.com" in DNS. I know I can edit /etc/hosts to do this, but I'd like to avoid doing that.
To explicate, normally when you browse to "http://admin.foo.com", it sends an HTTP request that looks something like this...
Is there any way (in Java Servlet) to determine whether a HTTP POST or GET request is a result from a submission from a HTML form or otherwise?
...
I am developing a Joomla component and one of the views needs to render itself as PDF. In the view, I have tried setting the content-type with the following line, but when I see the response, it is text/html anyways.
header('Content-type: application/pdf');
If I do this in a regular php page, everything works as expected. It seems tha...
I'm trying to direct a browser to a different page. If I wanted a GET request, I might say
document.location.href = 'http://example.com/q=a';
But the resource I'm trying to access won't respond properly unless I use a POST request. If this were not dynamically generated, I might use the HTML
<form action="http://example.com/" method=...
I have some code I've written in PHP for consuming our simple webservice, which I'd also like to provide in Perl for users who may prefer that language. What's the simplest method of making a HTTP request to do that? In PHP I can do it in one line with file_get_contents().
Here's the entire code I want to port to Perl:
/**
* Makes a r...
What is the best way to read an HTTP response from GetResponseStream ?
Currently I'm using the following approach.
Using SReader As StreamReader = New StreamReader(HttpRes.GetResponseStream)
SourceCode = SReader.ReadToEnd()
End Using
I'm not quite sure if this is the most effecient way to read an http response.
I need the output ...
I'm using browser automation for testing web sites but I need to verify HTTP requests from the browser (i.e., images, external scripts, XmlHttpRequest objects). Is there a way to programmatically instantiate a proxy for the browser to use in order to see what its sending?
I'm already using Fiddler to watch the traffic but I want somethi...
I'm using browser automation for testing web sites but I need to verify HTTP requests from the browser (i.e., images, external scripts, XmlHttpRequest objects). Is there a way to programmatically instantiate a proxy or packet sniffer for the browser to use in order to see what its sending?
I'm already using Fiddler to watch the traffic ...
Something I have always been interested in out of curiosity, is there a tool or utility that will allow me so log post parameters sent to a website? Not a personal website, any site on the web.
Reason for this, is that I want to be able to develop a .NET application without having to add the overhead of creating a WebBrowser object and ...
I am writing a web server in Java and I want it to support HTTP 1.1 Keep-Alive connections. But how can I tell when the client is done sending requests for a given connection? (like a double end-of-line or something).
Lets see how stackoverflow handles this very obscure question -- answers for which, on Google, are mired in technical s...
What application do you use to monitor HTTP communication on OS X?
...
This is what my browser sent, when logging into some site:
POST http://www.some.site/login.php HTTP/1.0
User-Agent: Opera/8.26 (X2000; Linux i686; Z; en)
Host: www.some.site
Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Accept-Language: en-US,en;q=0.9
Accep...
What's the most efficient way of fetching a file from a URL using Python?
...
Are there any major differences in performance between http and https? I seem to recall reading that https can be up to 1/5 times slower than http. Is this valid with the current generation webservers/browsers? If so, are there any whitepapers to support it?
...
Is it possible to create a .NET equivalent to the following code?
<?php
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm="My Realm"');
header('HTTP/1.0 401 Unauthorized');
echo 'Text to send if user hits Cancel button';
exit;
} else {
echo "<p>Hello {$_SERVER['PHP_AUTH_USER']}.</p>";
...
I suppose this question is a variation on a theme, but different.
Torrents will never replace HTTP, or even FTP download options. This said, why aren't there torrent links next to those options on more websites?
I'm imagining a web-system whereby downloaded files are able to be downloaded via HTTP, say from http://example.com/downloads...
I have implemented a simple file upload-download mechanism. When a user clicks a file name, the file is downloaded with these HTTP headers:
HTTP/1.1 200 OK
Date: Tue, 30 Sep 2008 14:00:39 GMT
Server: Microsoft-IIS/6.0
Content-Disposition: attachment; filename=filename.doc;
Content-Type: application/octet-stream
Content-Length: 10754
I...