http

A reliable HTTP library for .Net 2.0

.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 ...

What is the best way of handling non-validating SSL certificates in C#

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...

Sending an HTTP request to a different IP than what the hostname resolves to?

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...

How to differentiate a HTTP Request submitted from a HTML form and a HTTP Request submitted from a client?

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? ...

How do I set the Content-type in Joomla?

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...

Javascript Post Request like a Form Submit

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=...

What's the simplest way to make a HTTP GET request in Perl?

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 GetResponseStream() ?

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 ...

Is there any way in .NET to programmatically listen to HTTP traffic?

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...

Is there any way in .NET to programmatically listen to HTTP traffic?

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 ...

Log Post Parameters sent to a website

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 ...

How do I know WHEN to close an HTTP 1.1 Keep-Alive Connection?

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...

HTTP communication monitoring on OS X

What application do you use to monitor HTTP communication on OS X? ...

Is my form password being passed in clear text?

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 simplest to way to retrieve a file over HTTP using Python?

What's the most efficient way of fetching a file from a URL using Python? ...

HTTP vs HTTPS performance

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? ...

HTTP Authentication in .NET

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>"; ...

"name" web pdf for better default save filename in Acrobat?

...

Why isn't bittorrent more widespread?

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...

File name corruption on file download (IE)

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...