http

Why "Content-Length: 0" in POST requests?

A customer sometimes sends POST requests with Content-Length: 0 when submitting a form (10 to over 40 fields). We tested it with different browsers and from different locations but couldn't reproduce the error. The customer is using Internet Explorer 7 and a proxy. We asked them to let their system administrator see into the problem fr...

Problem using NSURLRequest to POST data to server

i create a NSURLRequest to post my data in the iphone application to a server to proceed the php script, my php script is look like this <?php $name = $_POST['name']; $email = $_POST['email']; $link = mysql_connect("localhost", "fffasfdas","Nfdsafafs") or die ("Unable to connect to database."); mysql_select_db("muradsbi_mydatabase") o...

How to determine if a page is being redirected

Hi, I need to check whether a page is being redirected or not without actually downloading the content. I just need the final URL. What's the best way of doing this is Python? Thanks! ...

YAML mime type?

What is the most appropriate MIME type to use when sending data structured with YAML over HTTP? An explanation of why a given choice is most appropriate would be much appreciated. There is no registered application type or text type that I can see. Example: > GET /example.yaml < Content-Type: ???? < < --- # Favorite movies < - Casab...

Simple "Long Polling" example code?

I can find lots of information on how Long Polling works (For example, this, and this), but no simple examples of how to implement this in code. All I can find is cometd, which relies on the Dojo JS framework, and a fairly complex server system.. Basically, how would I use Apache to serve the requests, and how would I write a simple sc...

Which HTTP status codes do you actually use when developing web applications?

The HTTP/1.1 specification (RFC2616) defines a number of status codes that can be returned by HTTP server to signal certain conditions. Some of those codes can be utilized by web applications (and frameworks). Which of those codes are the most useful in practice in both classic and asynchronous (XHR) responses, in what situations you use...

COMET (server push to client) on iPhone

I'm looking to establish some kind of socket/COMET type functionality from my server(s) to my iPhone application. Essentially, anytime a user manages to set an arbitrary object 'dirty' on the server, by say, updating their Address.. the feedback should be pushed from the server to any clients keeping a live poll to the server. The buzzwo...

Cookie path special characters

My application needs to set cookies for specific paths in the application. For example (in php): setcookie(*cookie_name*,*value*,*date*,"/subpath/subpath/unique_name"); setcookie(*cookie_name*,*value*,*date*,"/subpath/subpath/another unique name"); Oddly enough, the first setcookie works fine. The second doesn't generate an error and ...

How do I tell WCF to skip verification of the certificate?

Trying to make a web service call to an HTTPS endpoint in my Silverlight application results in this error: "Could not find a base address that matches scheme https for the endpoint with binding WSHttpBinding. Registered base address schemes are [http]" The same problem as was posted here: http://social.msdn.microsoft.com/Forums/en-US/...

Why does IIS not support chunked transfer encoding?

I am making an HTTP connection to an IIS web server and sending a POST request with the data encoded using Transfer-Encoding: chunked. When I do this, IIS simply closes the connection, with no error message or status code. According to the HTTP 1.1 spec, All HTTP/1.1 applications MUST be able to receive and decode the "chunked" tran...

Is it good practice to hide web server information in HTTP headers ?

This question is more security related than programming related, sorry if it shouldn't be here. I'm currently developing a web application and I'm curious as to why most websites don't mind displaying their exact server configuration in HTTP headers, like versions of Apache and PHP, with complete "mod_perl, mod_python, ..." listing and ...

What is the best way to send HTTP requests from Windows Powershell?

What is the best way to send HTTP requests from Windows Powershell? ...

GET vs POST in HTML forms

Possible Duplicate: When do you use POST and when do you use GET? When should an HTML form tag use a GET method and when should it use a POST method? ...

streaming binary data over http

I am looking into streaming binary data into a browser (through http). I am looking for opinions as to good ways to go about doing this. Ultimately I will have a real time data source and I would like to manipulate this data and display it (in real-ish time) in a browser. Firefox comes first, IE would be nice... but I'm not that picky. I...

Can an ASP.NET HttpHandler handle an http 400 - Bad Request?

We have an HttpHandler that deals directly with binary posts over HTTP from custom client software. The client software occasionally sends data which results in IIS 7 responding with a 400 - Bad Request. Since the "400 Bad Request" is special in that HTTP.SYS transparently handles it in kernel mode without notifying user mode of anything...

Differences in reload behavior between FF and IE

In Firefox a Reload seems to reload everything while on IE the Refresh reloads just the HTML part of the current page. In IE you need to press Ctrl-F5 for a complete reload. Why this difference and is it somewhere an article explaining this difference more thoroughly? ...

How to Modify the HTTP Response Using Filters in asp.net?

Modifying the HTTP Response Using Filters ...

C#/Winform: Enter data into HTML page, submit form

I have a Winform with a BackgroundWorker. The BackgroundWorker, among other things, has to make an HTTP call to a page, fill out some data, submit the form, and retrieve the HTML that comes back after "clicking" the submit button. I've run into a number of roadblocks while doing this: Can't POST the data because the target webserver do...

Setup error codes on IIS 6.0

I want the IIS server to return HTTP 304 (Not Modified) when a particular file is accessed. How can I set this up? ...

Acessing a url from windows application

Hi, Does anyone know how to acess a url from a windows application?. I have an address http://serverport/Page.I want to acess this page from my windows application. Regards, Harsh Suman ...