http

What is a request-response pair called?

For example in HTTP you send a request and receive a response; is there a noun that describes that request-response pair? I'd thought of "dialog" or "conversation" however those imply multiple request-response pairs, whereas I'm looking for a word that indicates exactly one. The reason for asking is that I need to name an object which ...

Best way to grab website content externally

There's a search site whose search results are generated dynamically by javascript. So the user enters a query, and the site displays the content on the page, without refreshing. I need to grab those search results programmatically (say from a Java program or a perl/python script). So ideally, I can launch my program with 100 queries...

Advice with Dynamic Forms in ASP.NET MVC

I am working on rendering a dynamic form in an ASP.NET MVC view that will meet these requirements: Fields can be validated State is preserved when the form is invalid I am looking into creating a custom model binder to achieve this. I am generally planning to do this: Form fields are defined with these properties Prompt (label nex...

How does XMLHttpRequest know when to invoke its callback?

Hello. From what I understand, if client side javascript code uses the XMLHttpRequest to make a POST request, it waits for a response and when it completes it changes its readystate to ReadyState.Complete and invokes the callback function. My question is: How does it determine that the response is complete? Does it return the content...

How to download multiple files with one HTTP request?

Use case: user clicks the link on a webpage - boom! load of files sitting in his folder. I tried to pack files using multipart/mixed message, but it seems to work only for Firefox This is how my response looks like: HTTP/1.0 200 OK Connection: close Date: Wed, 24 Jun 2009 23:41:40 GMT Content-Type: multipart/mixed;boundary=AMZ90RFX875L...

HTTP Expires header not respected by browser?

Hello, I have a situation where my (embedded) web server is sending Expires header, but the browser does not seem to respect the header setting, i.e., if I refresh the page, the browser requests the resources that are supposed to be cached. Following are the headers that are getting exchanged: https://192.168.1.180/scgi-bin/ajax/ajax....

Progress notifications from HTTP/REST service

I'm working on a web application that submits tasks to a master/worker system that farms out the tasks to any of a series of worker instances. The work queue master runs as a separate process (on a separate machine altogether) and tasks are submitted to the master via HTTP/REST requests. Once tasks are submitted to the work queue, clie...

What's the difference between Cache-Control: max-age=0 and no-cache ?

max-age=0 implies that the content is considered stale (and must be re-fetched) immediately, which is in effect the same thing as no-cache. Google has failed to solve this mystery for me :( ...

Easiest way to read from a URL into a string in .NET

Given a URL in a string: http://www.example.com/test.xml What's the easiest/most succinct way to download the contents of the file from the server (pointed to by the url) into a string in C#? The way I'm doing it at the moment is: WebRequest request = WebRequest.Create("http://www.example.com/test.xml"); WebResponse response = reque...

HttpWebRequest and Transfer-Encoding: chunked problem

HttpWebRequest is used to download files from ASP.NET site with basic authentication. Everything works fine in much cases. But some proxies make answer chunked and HttpWebRequest.GetResponse() throws an exception if answer with 401 code is chunked. The exception is: System.Net.WebException: The server committed a protocol violation. ...

ASIHTTPRequest: Receive delegates from several requests within a network queue

Hi, I use ASINetworkQueue to send two requests, which are in a queue. My problem is, that I'm not able to receive notifications when a request fails/is done. Code: [networkQueue cancelAllOperations]; [networkQueue setShowAccurateProgress:YES]; [networkQueue setUploadProgressDelegate:self.progressIndicator]; [networkQueue setDel...

Possible to do client-side HTTP push?

Pretty much the opposite of server-side push, also known as Comet. I'm wondering if it is possible to use long lived HTTP connections to push information to the server. Unlike a simple XHR, the connection would be kept alive and data would be streamed to the server at intervals, as the user completes actions etc. Using standard techno...

PHP AJAX proxy not returning body for POST requests

Hello, I am using this AJAX proxy for cross-domain AJAX requests: http://www.daniweb.com/code/snippet494.html. It works great when I use GET. But when I try to use POST, the body seems to get lost and is never printed out. I tried printing the log and studied the code but I cannot figure out what is going wrong. Thanks, Isaac Waller E...

Redirect with a 303 after POST to avoid "Webpage has expired": Will it work if there are more bytes than a GET request can handle?

I want to workaround the "Webpage has expired" issue. First, I just changed a POST to a GET, but that resulted in an error that my HTTP request exceeded the maximum size for a GET. So, now I'm thinking to try the technique described in the link below (post, 303, redirect), but will I still have the same size limitation problem? http...

Unexpected "100 continue"

I have 2 servers that communicates using .Net remoting. For some architectural reasons, I have a proxy between those 2 servers, that removes the "Expect: 100-continue" header from the request that is sent from one server to another. The problem is, that when the proxy sends the message to the second server without this header, the destin...

Swiching between Http or Https (based on parent directory)

I have a direcory for the members area. All the files within that directory should be treated by https. All other files outside the specific dir should be treated by http. How can i automate the redirecting from http and https and vice versa? Btw, the links are relative. ...

Why does the web need HTTP?

No, wait. I'm being totally serious. When HTTP was invented, FTP already existed. Why couldn't FTP be the web's transport protocol? Sure, it has a lot of missing feautres, but most were added as an afterthought to HTTP and could be added to FTP too, such as caching, compression, virtual hosting. You could event think of a protocol like...

Get HttpWebResponse headers WITHOUT redirecting

I want to check if a particular page gets redirected or not. However, whenever I try this the headers I get back seem to be from the redirected page, not the initially requested page (and, in particular, the status is OK rather than the 302 I want to see). Is there something I can set so that it won't automatically follow the redirects?...

How do browser cookie domains work?

Due to weird domain/subdomain cookie issues that I'm getting, I'd like to know how browsers handle cookies. If they do it in different ways, it would also be nice to know the differences. In other words - when a browser receives a cookie, that cookie MAY have a domain and a path attached to it. Or not, in which case the browser probably...

Switch back to http from https in SharePoint (MOSS 2007)

I have a MOSS 2007 instance and a web app (Site Collection) in port 80 that has an extension through port 443 to enable https. This instance has an asp.net web app that is inside the Site Collection. This asp.net web app enters https protocol when one of its qualifying aspx webforms is called, but when the user leaves the form the https...