http

Why is a file requested through https after it has already been fetched through http?

Hi all, I am trying to understand Http/Https a little better and possibly what headers I'm sending clients. Does the client have to re-fetch the same file under Https when it has already been fetched under Http, or do I need to send special headers? Well, the reason the file is served over http/https is that it is simply a banner. Wh...

Escaping ampersands in URLs for HttpClient requests

So I've got some Java code that uses Jakarta HttpClient like this: URI aURI = new URI( "http://host/index.php?title=" + title + "&action=edit" ); GetMethod aRequest = new GetMethod( aURI.getEscapedPathQuery()); The problem is that if title includes any ampersands (&), they're considered parameter delimiters and the request goes screwy...

Android, sending XML via HTTP POST (SOAP)

Hi, I would like to invoke a webservice via Android. I need to POST some XML to a URL via HTTP. I found this snipped for sending a POST, but i dont know how to include/add the XML data itself. public void postData() { // Create a new HttpClient and Post Header HttpClient httpclient = new DefaultHttpClient(); ...

URL encoding yes/or no?

I have a restful webservice which receives some structured data which is put straight into a database. The data is send from an OS using wget. I am just wondering whether I actually need to URL encode the data and if so why? Please note that it is no problem to do it but it might be uneccessary in this scenario. ...

Handling redirected URL within Flex app?

We have a Flex client and a server that is using the Spring/Blazeds project. After the user logs in and is authenticated, the spring security layer sends a redirect to a new URL which is where our main application is located. However, within the flex client, I'm currently using HTTPService for the initial request and I get the redirect...

How To Disable Curl Debug Output in PHP

I wrote a PHP CUrl Class, if i execute Methods which should return the Content, it returns at first the Headers and after that the Content. So i cant parse any XML Data. I need to Disable This Sample Output. HTTP/1.1 200 OK Date: Thu, 01 Apr 2010 20:11:58 GMT Server: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny4 with Suhosin-Patch mod_ssl/2....

Apache HTTP and WEblogic Plug-in Location Directive question

We are using Weblogic Portal and Apache 2.x http server with the weblogic plug-in for apache for load-balancing. We have an application that right now can only be accessed from one of our managed servers. What I would like to do is use the Location directive to direct all requests for that page to the one managed server and I can't get...

Keep-alive for long-lived HTTP session (not persistent HTTP)

At work, we have a client-server system where clients submit requests to a web server through HTTP. The server-side processing can sometimes take more than 60 seconds, which is the proxy timeout value set by our company's IT staff and cannot be changed. Is there a way to keep the HTTP connection alive for longer than 60 seconds (preferab...

.NET HttpListener Prefix issue with anything other than localhost

I'm trying to use C# and HttpListener with a prefix of anything other than localhost and it fails (i.e. if I give it "server1", i.e. http://localhost:1234 works, but http://server1:1234 fails The code is... HttpListener listener = new HttpListener(); String prefix = @"http://server1:1234"; listener.Prefixes.Add(prefix); listener.St...

Get HTTP header fields only on iPhone

I want to get only the headers of an URL request. I have been using stringWithContentsOfURL() for all downloading so far, but now I am only interested in the headers and downloading the entire file is not feasible as it is too large. I have found solutions which show how to read the headers after the response has been receieved, but how...

What is the point to put deadlock code ahead of JSON in HTTP response?

When sniffing Gmail and Facebook traffic, I found there are leading deadlock code before JSON response of XmlHttpRequest. For example for (;;);{"t":"continue"} and while(1); [["v","nW3OxUDq0kU.en.","8","51bec53f21305d9c"],["di",86]] What is the purpose of this "for(;;);" and "while(1);" deadlock? ...

Will data order in post form be the same to it in web form?

Assuming there are 5 inputs in web form <input name='the_same[]' value='different' /> <input name='the_same[]' value='different' /> <input name='the_same[]' value='different' /> <input name='the_same[]' value='different' /> <input name='the_same[]' value='different' /> When server side receive the post data, i use a foreach to accept ...

Apache deflate with chucked encoding

I'm expiriencing some problem with one of my data source services. As it says in HTTP response headers it's running on Apache-Coyote/1.1. Server gives responses with Transfer-Encoding: chunked, here sample response: HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Type: text/xml;charset=utf-8 Transfer-Encoding: chunked Date: Tue, 30 Ma...

How to initiate chatting between two clients and two clients only, using applets and servlets?

Hello everyone, I first need to apologize for my earlier questions. (You can check my profile for them)They seemed to ask more questions than give answers. Hence, I am laying down the actual question that started all them absurd questions. I am trying to design a chat applet. Till now, I have coded the applet, servlet and communication...

Can I use HTTP Post Requests for SOAP? - SOAP and Django

Hi folks, I am wondering if I could use simply use HTTP POST Requests in order to implement a SOAP API. If so how should I format and treat the requests? ...

How to handle redirects while parsing HTML? - Python

Hi folks, I'm trying to submit a few forms through a Python script, I'm using the mechanized library. This is so I can implement a temporary API. The problem is that before after submission a blank page is returned informing that the request is being processed, after a few seconds the page is redirected to the final page. I underst...

http response to GET request - working in FF not Chromium

For fun I'm trying to write a very simple server in C. When I send this response to Firefox it prints out the body "hello, world" but with Chromium it gives me a Error 100 (net::ERR_CONNECTION_CLOSED): Unknown error. This, I believe, is the relevant code: char *response = "HTTP/1.0 200 OK\r\nVary: Accept-Encoding, Accept-Language\r\nC...

How to expand URLs in C#?

If I have a URL like http://popurls.com/go/msn.com/l4eba1e6a0ffbd9fc915948434423a7d5, how do I expand it back to the original URL programmatically? Obviously I could use an API like expandurl.com but that will limits me to 100 requests per hour. ...

Hooking the http/https protocol in IE causes GET requests to be sequential

I'm using the PassthruAPP method to hook into HTTP/HTTPS requests made by IE. It's working well for the most part, however I noticed a problem. Only one download thread is active at a time, normally IE uses two download threads. I can see two IInternetProtocol objects getting created, but IE uses only one at a time. This is happening...

Is there anyway to make a Rails / Rack application tell the web server to drop the connection

There are many security reasons why one would want to drop an HTTP connection with no response (eg. OWASP's SSL best practices). When these can be detected at the server level then it's no big deal. However, what if you can only detect this condition at the application level? Does Rails, or more generally Rack, have any standard way o...