http

Utilizing persistence with Apache HttpClient?

My goal is to connect to a server and then maintain the connection. The server keeps pushing me some data whenever it has any. I wrote the following but it works only the first time. The second time onwards, it gives me an exception saying that the get.getResponseBodyAsStream() is null. I was thinking that Apache's HTTPClient keeps the c...

What API (or lib) do I should use to sniff local network ports on Mac OS X (Cocoa)?

I'm trying to make a simple HTTP sniffer (like HTTPFox) development testing purpose. HTTPFox is good enough, but I should automate some kind of test. (No detail yet) But I have no idea how to do this. What kind of API or libs do I should use to do this on Mac? Cocoa will be great but any lower level ways are welcome. ...

Is this the right way to write a Comet client?

I started using x-socket for writing a simple Comet client that can connect to a server implemented using grizzly comet with the goal of maintaining a persistent connection on which the server can push updates to the client. I wrote the following but I am not sure if this is the right way of doing it because I am not able to see any upda...

which java http client library is easy to use for programmatically doing posts, setting cookies and maybe ajax?

which java http client library is easy to use for programmatically doing posts, setting cookies and maybe ajax? ...

How web request executed via internet?

I want to know how web request executed while requesting any information from other server. I want to know internal of this message processing means when we click any button on web page then how it converted to GET/POST request in proper message format inclucing SOAP etc. Is there any link or book from where i can get these info. Please ...

Does WebKit Cache 3rd Party Resources?

In Chrome and Safari a remote image included on my site never seems to get requested with caching-friendly headers (If-Modified-Since, etc) despite the server returning the appropriate information. Local resources, on the other hand, are requested with these headers. In contrast Firefox requests the remote resources with caching-friendly...

Gzip compression for HTTP requests

Is there any way to make browsers &/or Silverlight application do a GZIP compression of HTTP requests? Don't confuse with GZIP compression of HTTP responses - I know how to set this up on the server side. What I need is to compress requests as well, and protocol allows that - anybody using it? Configuration tips? ...

Servering mulitple flv files from custom webserver while keeping the sockets open stops after the 6th connection

This is driving me nuts and because it's a combination of various technologies together I have a hard time tracking the problem. Scenario I wrote a tiny HTTP server that serves .flv files; these flv files are encoded on the spot. The flv files are encoded with adobe's screencodec (I started with libflv but that was too buggy so I ende...

.NET compact framework - "offline webservices" support

Hello I have a Win Mobile 6.0 .NET CF application that uses a reference to a WebService in order to call web methods on it. In normal situations where the device is in WLAN coverage, the web methods can be executed synchronously by the device. The issue is when the device goes off-line (no WIFI or GPRS coverage). I want that the applic...

whats the best way to read a csv file from a url in C#

i have a url when i click on it i get windows asking me what to open it in and it recommends excel. I now want to read this csv data dynamically in a c# application. what is the best way of getting csv data from Http Request to a url? ...

How to print all information from an HTTP request to the screen, in PHP

I need some PHP code that does a dump of all the information in an HTTP request, including headers and the contents of any information included in a POST request. Basically, a diagnostic tool that spits out exactly what I send to a server. Does anyone have some code that does this? ...

C++ libcurl http response code issues

Hello everyone, This issue/quirk/side-effect is driving me crazy. Near the bottom the code, the response code of the HTTP interaction is passed by reference into responseCode_. However it often comes out as 0 even though the site can otherwise be accessed, and returns too quickly to be a timeout... All variables are defined, the code b...

When a form doesn't post to the page it's on, what's the best way to pass the error state back?

If I have a form that's on page http://foo.com/get, but posts to http://foo.com/post, what's the best way to handle displaying validation errors? I want to redirect the user back to the first page. How can I stash the form state (including error messages), so that on the next request following the redirect to http://foo.com/get I can g...

File upload HTTP PUT in C#

I am writing a desktop app in C# for upload large sized files on a webserver using HTTP PUT. I have tried libcurl .net but it seems the bindings seem pretty difficult to use. Is there a better and easier way? PS: My server is nginx. I believe HTTP PUT is the best way but if there is a better alternative available on nginx, I can use th...

http headers for faster image loading ?

Hi, I need to load almost 100's of images in a single page on my website. ( product image, lots of them ). Whenever image change for product, url for that image also changes. i.e. for one url corresponding iamge never changes. Now I want to make sure that for a same person browsing through website, the image must not load again. Is ex...

WCF Https vs Http.

Hello, There are two samples: for http: using System; using System.Net; using System.Net.Security; using System.Security.Cryptography.X509Certificates; using System.ServiceModel; using System.ServiceModel.Description; using System.ServiceModel.Security; namespace ConsoleApplication1 { internal class Program { private s...

HTTP_CLIENT_TIMEOUT and cookie expiry period are same?

Is HttpURLConnection.HTTP_CLIENT_TIMEOUT is true, then does this mean session expired? If yes, Then, does this same as, cookie expiry ? ...

Using PHP and Curl to POST an entire folder to another Server

What is the best way using PHP and Curl to POST an entire folder to another server. ...

How to make an NSURLRequest login NOT in plain text

Whats the best way to make this a more secure and less obvious security risk? NSString *loginIdentification = [NSString stringWithFormat:@"user=%@&pass=%@&", userNameLogin, passWordLogin]; addressVariable = [NSString stringWithFormat:@"%@/%@", url, loginIdentification]; addressVariable = [addressVariable stringByAddingPercentE...

HTTP & HTTPS Iframe

Hi Guys, I am creating a small widget and I want to allow others to use it. The iFrame is loaded from HTTP - but I want to allow users to login via HTTPS i.e. that is - send a request for login via SSL Is this allowed within the same-origin policies or ? i.e. the scenario is that a user can integrate my javascript to their website, th...