http

Google.com and clients1.google.com/generate_204

I was looking into google.com's Net activity in firebug just because I was curious and noticed a request was returning "204 No Content." It turns out that a 204 No Content "is primarily intended to allow input for actions to take place without causing a change to the user agent's active document view, although any new or updated metainf...

Silveright image source on web not showing anything

I'm sure that this is a simple newbie question, but the answer is eluding me right now. I have the following control compiled in Silverlight 3: <UserControl x:Class="SLImageTest.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http:/...

How can I handle HTTP redirects in my Perl application?

I use this Perl subroutine to get a line from a webpage, which I then split to get the information I require to proceed. This has worked for a dozen years. sub capture_line { my $page_to_get = $_[0]; my $host_to_get_text = $_[1]; my $port = 80; my $buf = &HTTPGet($page_to_get, $host_to_get_text, $port); my $image_capture...

Help, don't know what's wrong with my HTTP multipart POST

POST /upload HTTP/1.1 Host: assets.drop.io User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.10) Gecko/2 009042316 Firefox/3.0.10 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Content-Length: 5728 Content-Type: multipart/form-data; boundary=--------MalolHCBdarysNYMHZbIvjbD --------MalolHCBda...

API development, one gateway page?

Im currently developing an API, and one thing that I decided was to have one gateway.cfm page that the client sends the request to with a sig for verification and etc, and the gateway processes the request and sends the result back by invoking the components needed. For example gateway.cfm?component=getBooks&sig=232345343 will call th...

HTTP GET and POST parameters recommendations

Is it bad practice to issue the following POST request: /test?a=1&b=2 POST data: c=3&d=4 Notice that 2 parameters are part of the URL and 2 parameters are part of the POST content. On another note, is the following rule still recommended: GET request: retrieve content from the server but do not change anything on the server. POST r...

C# HTTP web request keeps timing out

I am making a Http Webrequest to an available site that I can visit fine, but the HTTP Web request keeps timing out. Is there any reason why this code might allow it to timeout when it shouldn't? I've tried upping the timeout setting, but it still continues to timeout. Uri CameraUrl = new Uri("http://" + cfg_cameraIps[i]); Http...

Is performing login with https but then everything in http all a bit pointless?

So you've performed the login using https to prevent man in the middle attacks and make sure your password isn't sent in the clear. Good call. But many sites then switch back to http for the rest of the session. Once you're exchanging everything in the clear can't a man in the middle begin hijacking your session again? Okay, so they don...

Modifying First and Last Name in Hotmail via script

I would like to write a script that logs into hotmail and changes the first and last name. I am thinking of perl for this, although I imagine that any language would do. How do I find out what requests to make? I'm guessing that I can do the change requests manually, determine what http requests are being sent to/from the server, determ...

throwing/returning a 404 actionresult or exception in Asp.net MVC and letting IIS handle it

Howdy, how do I throw a 404 or FileNotFound exception/result from my action and let IIS use my customErrors config section to show the 404 page? I've defined my customErrors like so <customErrors mode="On" defaultRedirect="/trouble"> <error statusCode="404" redirect="/notfound" /> </customErrors> My first attempt at an actionResul...

HTTP chunks: All chunks sent consecutively and uninterrupted?

Can I be sure that a chunked HTTP response will be sent uninterrupted by anything else? I need to differentiate responses (and requests) and this isn't a simple case of reading content length, seeing a closed connection or a no-body response code. Can I read each chunk and once chunk-size is 0 I will have read exactly one response (or r...

downloading a file from a web directory

hi. i have a form which allows the user to upload some files to a folder. i've edit the .htaccess file in that directory to protect this folder from allowing the unwanted visitors to download the contents manually by typing the full url ex: http://www.bkabkabka.com/a/b/c/document.pdf and this is the .htaccess data Options All -Indexe...

Custom HttpHandler to block downloads of .wmv files

Hi I create a custom http handler to block download of .wmv files e.g. www.pakdev.net/videos/file.wmv (blocked by httpHandler). But the problem is that now silverlight cannot also stream these video files as they are blocked too. What should I do? ...

Mapping Handler to Static Extension

What are some unintended consequences associated with mapping an ASP.NET HTTP Handler to a static extension like *.css? <add verb="*" path="handler.css" type="Web.HttpHandler.ThemeCssHandler" /> By default, *.css is registered as static content in applicationHost (under IIS7): <staticContent lockAttributes="isDocFooterFileName"> ...

Why can HTTP handle only one pending request per socket?

Being curious, I wonder why HTTP, by design, can only handle one pending request per socket. I understand that this limitation is because there is no 'Id' to associate a request to its response, so the only way to match a response with its request is to send the response on the same socket that sent the request. There would be no way to...

How to send password securely via HTTP using Javascript in absence of HTTPS?

The very basic issue all developers face: Whenever user submits the form, the password is sent via network and it must be protected. The site I develop for doesn't have HTTPS. Neither does the owner want to buy a SSL certificate, nor is he interested in a self-signed one. So I want to protect the password sent via HTTP using Javascript w...

Why does the browser hang when I register a cleanup handler in mod_perl?

I'm using $r->pool->cleanup_register(\&cleanup); to run a subroutine after a page has been processed and printed to the client. My hope was that the client would see the complete page, and Apache could continue doing some processing in the background that takes a few seconds. But the client browser hangs until cleanup sub has returned. ...

How to force ASP.NET Web Service expose only HTTP-POST interface.

After creating a new ASP.NET Web Service I want it only to support HTTP-POST for incoming data. How can I force the WSDL to reflect that policy? How should the WSDL for the clients look like to enable only HTTP-POST and disallow SOAP 1.1 and SOAP 1.2 in the WSDL? The solution: <system.web> <webServices> <protocols> <clear /> ...

Does Vignette CMS serve HTML, CSS and JavaScript content gzipped?

I’m working on a project involving Vignette as the CMS. Does anyone know if it serves HTML, CSS and JavaScript content gzipped? (If anyone’s got an example of a site run on Vignette, that’d be great too, I could see if it’s doing it.) ...

How to Speed Up Python's urllib2 when doing multiple requests

I am making several http requests to a particular host using python's urllib2 library. Each time a request is made a new tcp and http connection is created which takes a noticeable amount of time. Is there any way to keep the tcp/http connection alive using urllib2? ...