http

Enabling gzip compression for Jboss

How is gzip compression for Jboss 5.1.0 enabled? Within the tomcat http connector right? I cant remember where this file is stored, server.xml? ...

Separation of logic from presentation: HTTP variable names?

Hello all, This could probably be considered an academic question, rather than a real world one - but throwing it out to see if anyone has any great ideas! We all know that keeping the business logic of an application separate from the presentation is a good idea (I'm looking at web-apps atm), but there needs to be an understanding betw...

Why are my aspx pages not being cached on the client?

I have a dynamically generated CSS file. It's fairly large, and has different content for different browsers. It changes very rarely. So at the top of the .aspx page I have: <%@ OutputCache Duration="86400" Location="ServerAndClient" VaryByParam="none" VaryByCustom="browser" %> I hav...

Erlang: HTTP GET Parameters with Inets

The following post indicates how to make a simple get http request with Erlang's inets. exploring erlang's http client Sometimes, URLs have GET parameters: http://example.net/item?parameter1=12&amp;parameter2=1431&amp;parameter3=8765 Besides including the parameters in the URL itself, is there a way to create variables and then send ...

Preserve name of file using cURL to transfer files

I'm transferring files from an existing http request using cURL like so... $postargs = array( 'nonfilefield' =>'nonfilevalue', 'fileentry' => '@'.$_FILES['thefile']['tmp_name'][0] ); $ch = curl_init('http://localhost/curl/rec.php'); curl_setopt($ch,CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Window...

HTTP Debug Recorder and Auto-responder

Can you recommend a good HTTP Debug Recorder and Autoresponder? I usually use fiddler's autoresponder, but it does not enable rules to be set by POST information, only by querystring. ...

What does it mean when a DataInputStream keeps returning 0?

I have a DataInputStream, created from a Socket in Java. The connection is to a simple web server that uses chunked transfer encoding. The web server does in fact work in normal browser. But in my program, I am attempting to read, I read the first first bytes (some 5kb of data). But each read after that returns 0 bytes read. Isn't it sup...

Erlang: HTTP Accept Header with Inets

I am trying to do the equivalent of the following curl command : curl -H "Accept: text/plain" http://127.0.0.1:8033/stats I tried with an Inets simple http request. But, it isn't processed. How can I specify in Inets (or some other Erlang http client for that matter) the accept header requirement? ...

Recreating http request with cURL incl. files

I consistently get the error 'failed creating formpost data' from the below code, the same thing works perfectly on my local testing server, but on my shared host it throws the error. The sample part is just to simulate building the array with both files and non-file data. Essentially all I'm trying to do here is redirect the same http ...

Java HTTP Client Request with defined timeout

Hello, I would like to make BIT (Built in tests) to a number of server in my cloud. I need the request to fail on large timeout. How should I do this with java? Trying something like the below does not seem to work. public class TestNodeAliveness { public static NodeStatus nodeBIT(String elasticIP) throws ClientProtocolException, IO...

HTTP GET: Same GET-Parameter multiple Times, is this allowed by RFCs?

Hello, are all "Standard Compliant (HTTP RFC?)" Web-Servers forced to "somehow" provide some methods to get all Parameters with the same name as some kind of list/array? Or will will using the same parameter name lead to overwriting: Example: http://www.stackoverflow?myparam=value1&amp;myparam=value2 Will this lead to myparam holdin...

PHP, Ajax, and the lifespan of the request

I was wondering about the lifespan of a PHP script when called via Ajax. Assume that there is a long-running (i.e. 30 seconds) PHP script on a server and that page is loaded via Ajax. Before the script completes, the user closes the browser. Does the script continue running to completion, is it terminated, or is this a function of the...

Should I use the java.net or org.apache.http library for HTTP in my Java application?

What should I know about the trade-offs between these two HTTP libraries? ...

Forgetting http authentication in Selenium

If I have a Selenium test which is currently logged in (with HTTP Authentication) to a particular website, how can I cause the remote browser to forget the current authentication so that I can log in as a different user (while remaining within the same test)? ...

Why NOT use POST method here?

I have a classifieds website. In the main page (index) I have several form fields which the user may or may not fill in, in order to specify a detailed search of classifieds. Ex: Category: Cars Price from: 3000 Price to: 10000 Color: Red Area: California The forms' action is set to a php page: <form action='quer...

WCF service blocked by Windows Firewall

Hi, I've got a WCF service using a HttpBinding. The service is running in a self hosting process (A Windows Service) and this process is inside the Windows Firewall exceptions list. If the Firewall is active and I'm trying to access the service using a C# client or Internet Explorer, the service does not respond. But if the Firewall is...

Forcing the browser to pop a save as dialog box from a link pointing to remote url

Hi, I am building a web app that lets the user directly download files on a cdn by clicking a link. The link should point to the cdn url directly in order to minimize the load on our servers. We would like the to have the browser pop up the save as dialog box when the user clicks the link to download the file and not have the browser ...

.MP3 download in an HTTP Response

Hi Folks, I've a question about something I'm searching for, ... for too long! We've build an application from which an admin upload songs into a database. Then user can bought songs and download it individualy. The problem is that when user download MP3 songs with the code below, it works great in Firefox and Chrome but not in IE8 simp...

How do you cache a file client-side such that the browser stops even bothering to request it again?

I send back an image with the following HTTP response header: Cache-Control: private,max-age=86400 My understanding is that the browser should not even ask for this file for 24 hours (86,400 = 60s * 60m * 24h). What I'm seeing on subsequent requests is that it still asks for the file, but gets back a "304 Not Modified." This is good...

Why do I get HTTP Code 414 on one network but not another?

I have an otherwise working iPhone program. A recent change means that it generates some very long URLs (over 4000 characters sometimes) which I know isn't a great idea and I know how to fix -- that's not what I'm asking here. The curious thing is that when I make the connection using a 3G network (Vodafone UK) I get this HTTP "414 Requ...