http

How can I detect if page was requested via a redirect?

On a client's website there are loads of redirects going to a particular page. This page somehow needs to have a way detecting whether the request was direct (URI typed in manually) or a redirect. All of the redirects are 301 redirects. Due to SEO rules added indicators need to be avoided. (Google indexes urls with values separately) I...

How should a HTTP server (using sockets) detect that the client is no longer connected and abort processing?

I'm implementing a basic HTTP Server in C++, using boost::asio. As I process each request, I write out the data in chunks, asychronously. If at any point I knew the client was no longer connected, I'd like to abort the processing, e.g. there's no point continuing to build results up to send out if the client is no longer there. I thin...

Favorite way to synchronize sqlite3 db on iPhone over HTTP

I currently have an sqlite3 database in my iPhone application. The database has grown to 10MB+ on its own with all of the data I've thrown at it so far. Some of the data I'd rather not have part of the App Bundle as well. If I provide just the schema, what's your favorite way of syncing all of the tables over HTTP? ...

Spoofing the origination IP address of an HTTP request

This only needs to work on a single subnet and is not for malicious use. I have a load testing tool written in Python that basically blasts HTTP requests at a URL. I need to run performance tests against an IP-based load balancer, so the requests must come from a range of IP's. Most commercial performance tools provide this function...

Send iPhone HTTP request to Apache PHP webserver

I am programmer with a games and 3D graphics background and at the moment I would like to brush up on my networking and web development skills. I have a task that I would like to accomplish to do this. My idea is that I would like to be able to send a HTTP request or something similar to my webserver, which runs a LAMP based setup. I wo...

http meta refresh issue

Hello everyone, I am using http meta refresh to reflesh current page to keep session live. I am using VSTS 2008 + C# + .Net 3.5 and developing ASP.Net application. My question is, is it possible to send from client (browser) side If-Not-Modified-Since request header to server side and check if at server side responses 304 Not-Modified ...

Mod_Rewrite Force HTTP On All Files Except One

Hi, Sorry if this has been asked before, but I couldn't find it. I have a folder which when I visit loads in both HTTPS and HTTP. I want all the files in that folder to load in HTTP except for one file. The file I need in in HTTPS is: login.php and this folder is called "forum". Also if it helps: All the files in the folder are *.php. ...

any ideas to optimize the ASP.Net server load

Hello everyone, I am developing using VSTS 2008 + C# + .Net 3.5 to develop ASP.Net application. At client side, in order to keep session live, I will refresh server for every 5 seconds. Here is my code at client side, server side Default.aspx will do nothing -- for the only purpose to keep client alive. <html> <head> <meta http-equiv="...

How to implement HTTP Tunneling

Hi all, I've written a Flash (Flex) client connecting to a back-end server to exchange data. I've also written my server from scratch, and it serves two purposes: (1) Web (HTTP) Server- By default listens on port 80 (2) Socket/Application- Server - By default listens on port 443 Just FYI, both servers run in the same process space,...

Parsing HTTP data into PHP variables

I have a reasonably large number of variables encoded in the form: foo=bar&spam[eggs]=delicious&... These are all in a single string (eg, $data = "foo=bar&spam[eggs]=delicious&..."). The variables are arbitrarily deeply nested -- easily four or five levels deep ("spam[eggs][bloody][vikings]=loud"). Is there an easy, reliable way to ...

Max-age and 304 Not Modified Processing

I've been looking at the standards - but was not entirely sure about the following: If we have a variant (resource, image, page etc) that is served with a cache setting of max-age=259200 (3 days) and the server is also processing ETags and last modified dates - then what will happen when the max-age is reached - but the resource has not...

Python POST ordered params

I have a web service that accepts passed in params using http POST but in a specific order, eg (name,password,data). I have tried to use httplib but all the Python http POST libraries seem to take a dictionary, which is an unordered data structure. Any thoughts on how to http POST params in order for Python? Thanks! ...

Retrieving XML document and parsing an HTTP header at the same time (C#).

I need to connect a piece of middleware I'm writing in C# to Adobe Connect. Their API returns all data queryied as an XML document. The issue I'm having is this: I need to check a response to see if the login attempt is successful, and if it is I need to retrieve the cookie from the HTTP headers so that I can use that cookie to perform t...

Complete Http Library

Hi, I am looking for an http library (for c# program) that will allow me to download some html documents from the web. i am aware to the HttpWebRequest object and the other options that provided by the .NET library, however, i need more complete solution that would be able to handle different document encodings (sometimes the encoding i...

Is index building always complete when a POST or PUT HTTP request returns in google app engine?

Very simply, I wish to know if (in google app engine): When I make a POST or PUT HTTP request. And the POST or PUT creates a change to the google app engine database After the POST or PUT request returns Is there a guarantee that the index has been updated to reflect the changes made? There is a explanation here about what happens wh...

Text in HTTP headers

Is there any rule against sending an alternate text for an HTTP response error? For example, a default is HTTP/1.1 400 Bad Request. When sending a header I set myself is it legal to do something like HTTP/1.1 400 Epic Fail? ...

Is there a tutorial for inserting messages into MSMQ 3.0 using PHP over HTTP?

Background: The MSMQ is hosted on Windows 2003. The queue that will receive the messages is a public queue. I have installed MSMQ HTTP Support on the server. From some of the white papers on MSDN, it appears that you can insert messages into MSMQ using SOAP/XML. The process, however, of just finding the WSDL endpoint is not clear t...

I'd like to send a "Fire and Forget" query to a PHP page.

I'm implementing various PHP & ASP.NET web apps for a client. I'd like to install a very low overhead user tracking system. (It has to be on the intranet, this is an internal system only). I'd like to do something like the following: line 1 normal code line 2 normal code line 3 Send Request/Query/Info to http://internal-IP/userTra...

JavaScript/Ajax/Flash HTTP Request

Hi, i got code like this: swfobject.embedSWF("/Content/open-flash-chart.swf", "my_chart", "750", "300", "9.0.0", "expressInstall.swf", {"data-file":"http://localhost:8803/StatisticService/GetOpenFlashChartStatistic_Json?param1=123&amp;par...

How often is the Silverlight Access policy accessed?

Hi As you may well know, it is required to host an access policy (clientaccesspolicy.xml) on your web server if you want SL apps to perform HTTP requests, or you need to host an access server on port 943 for socket connections. My app makes many short requests and latency is important. I want to know if this access policy file is acce...