http

.htaccess to Redirect All Traffic to One Page (410 Gone)

We have a client that is closing its doors. We want to redirect all traffic that goes to their domain to a new page index.html with a few images in the _img subdirectory. (The page explains what happened, what current customers can expect with their current orders, etc.) I've read about possibly using HTTP 410 Gone as the best way to te...

How do I send a HEAD request manually using Firefox?

I'm debugging my webserver, and I'd like to manually send HEAD requests to some web pages. Is there a way to do this in Firefox? Some extension perhaps. I want to use firefox so that it can be part of a normal session (ie cookies set, logged in, etc). So things like curl aren't perfect. ...

Best practice for handling HTTP HEAD request with Django on App Engine

I'm receiving HEAD requests in my application, and wondering on the best way to handle them. Options are: convert them to GETs, process GET normally, then: strip the body (though I'm not sure how - response.content = '' doesn't seem to do it. it seems app engine auto-strips the body, giving a warning "Dropping unexpected body in respo...

javascript http get operation issue

Hello everyone, I am new to Javascript and try to find a solution to my issue but failed. My problem is, I have an input text box and a search submit button, and when user clicks the Search submit button, I want to redirect user to url http://testsearch/results.aspx?k=<value of text box k>, for example, if user put "StackOverflow" in...

"I am a Teapot" HTTP 418 Status Code

There seems to be an HTTP Status code 418: "I am a teapot". What does it do? Is it supported by all the browsers? ...

Detecting HTTP close using inet

In my mochiweb application, I am using a long held HTTP request. I wanted to detect when the connection with the user died, and I figured out how to do that by doing: Socket = Req:get(socket), inet:setopts(Socket, [{active, once}]), receive {tcp_closed, Socket} -> % handle clean up Data -> % do someth...

Content negotiation and HTTP headers in PHP

This is a following to my yesterday question: http://stackoverflow.com/questions/1975416/trying-to-understand-the-vary-http-header I have a .php that can be served with different MIME types. To do this I use "Vary: Accept" HTTP header (which is confirmed to be correct). But what if the same document (with the same URL) can be served in ...

Send data to HTTPservlet in android

This is the servlet code in java ME. protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); ArrayList<String> listName = new ArrayList<String>(); ArrayList<Integer> listLongitude = new ArrayList<Integer>(); ArrayList<I...

track outbound links in my inbound server

on my website i have a facebook like says www.facebook.com/myhomepage.htm, now when a person clicks on this link, i want the capture the querystring in my website, so basically put an underlying link like www.mysite.com/?s=abc&k=ccr is this possible to send one link out and have a hidden link that captures the clicks? ...

Is my PHP script cache (public) friendly?

I have finalized a small PHP application that can serve many documents. These documents must be cacheable by clients and proxies. Since proxies can cache my results I must be extra careful because the documents I serve can have different MIMEs types (content negotiation based on $_SERVER['HTTP_ACCEPT']) and different languages (based in...

Mod Rewrite Clean URL's

How can I transform: http://example.com/about.php http://example.com/hello/deep.php http://example.com/hello/world/deeper.php Dynamically, into URLs like: http://example.com/about/ http://example.com/hello/deep/ http://example.com/hello/world/deeper/ ...

Firefox not handling content type correctly when using IHttpHandler

Firefox is for some reason not properly handling content sent through my .NET HTTP handler; it appears to be not honoring the content type header. Rather, it sees the content as being HTML. The URL mapped to the request even has a .csv extension. Internet Explorer and Chrome are doing the right thing. The problem is happening for bot...

Configure Apache to route "GET /user/foo" to /user/GET.php and "PUT /user/foo" to /user/PUT.php

I would like to arrange things so that a GET request for e.g. http://example.com/user/[email protected] internally calls the script /var/www/example.com/rest/user/GET.php and a PUT request for the same URL internally calls the script /var/www/example.com/rest/user/PUT.php and so on for the other HTTP verbs POST and DELETE. It's almos...

SimpleHTTPServer, shoutdown and blocked request handlers

I have an instance of SimpleHTTPServer, however when I try to call "shutdown" on it and there is a request handler that is blocked - the whole process will block. It does so even if I run the "serve_forever" method in a deamon thread. See example code at http://codepad.org/cn8EYdfg Any advice? ...

Content Disposition Problem

Hi, I have a sql database that stores media files (.avi f.e.). I extract the video in a aspx page (VIDEOPAGE) as a byte array and send it to another web page calling this one (It has to be this way), and showing the video using an html object tag presenting a windows media player control. The syntax I use is: Response.ContentType = c...

Display jpegs coming from http post

Hello. I'm sending jpegs to a web server via Http POST. I can access the bytes of each jpeg file that reaches the web server. Now I want do display these jpeg as they reach the web server, as a mjpeg video. How can I do it? Please help! Thanks ...

Dev C++ Wininet Upload file using HTTP

I want to upload "C:\test.txt" to webserver, when I am running program, file is not uploading and I am not getting any error. the complete C++ code can be find here and php code on webserver can be find here: "http://student114.110mb.com/upload.txt" or "http://student114.110mb.com/upload.php" kindly help me where I am doing wrong ...

submitting posts on pastie, or pastebin in C#

I'm looking for a way to submit a post to pastie.org, or pastebin.com from within my C# app, i know ill have to use some sort of http post but im looking for specific examples.. ...

Max payload size for http request and response, iphone

Is there any limits for the payload size of an http request in iphone? I'm requiring to upload images to the server, so will be sending NSData of the image as an http request. Is there any limit in that payload. Similarly, will there be any limits for the respose also? ...

Connection Time out in iphone for http requests.

What is the connection time out in the case of iphones. How long will the compiler wait for a response after a request have been made?? ...