http

Flex 3 reads browser http proxy setting

Is there a way to know the proxy setting of web browser under Flex 3, namely actionscript 3? We use socket library to connect remote HTTP server. It is nice to read web proxy setting to connect to HTTP proxy instead of directly to HTTP server. ...

cant get VBA to write "http://"as text?

Hi everyone, I wrote the code bellow and need the asociated .PGP file to have the text http:// included. the PGP file is namely read by Autocad which requers the "http://" in its text to be able to launch the desierd webpage. problem is , is that VBA is Auto formating the http:// as a code entatie and not writting it to the text based P...

URL Rewrite in ASP.NET 3.5 and IIS 7 using HTTP Module

Hi StackOverflow, I am developing an application in ASP.NET 3.5 and IIS 7. I have written an HTTP Module to perform URL Rewrite, for instance, I want to rewrite a username to an Account ID "~/Profiles/profile.aspx?AccountID=" + account.AccountID.ToString(); See below: using System; using System.Collections.Generic; using System.Data;...

Django creating object from POST

Hello, I have a question regarding Djanog views here is a sample code def example register ( request ) : if request.method == ’POST ’ : username = request.POST.get ( ’ username ’ ) password = request.POST.get ( ’ password ’ ) email = request.POST.get (’email’) user = User.objects .create_user ( username , email , password ) user . sa...

REST based HTTP API - should I use WCF?

I would like to code a REST based HTTP API which is accessible from .NET and any other language like for example Python. Should I use WCF for this? Or will that make the other languages harder to interop with my API? I want the server to carry no state at all, and I want to be able to take advantage of HTTP persistent connections becau...

Using netcat (nc) as an HTTP proxy server and monitor

Is it possible to use the Unix netcat (nc) program to create a TCP proxy server and monitor? I would like all TCP traffic to be passed across the pipe, as well as sent to stdout for monitoring. Note this will be used for monitoring HTTP traffic between a hardware device and an HTTP server. ...

POST binary file with cmd line curl using headers contained in the file

I'm trying to send a binary file to a server over HTTP. The beginning of the file contains headers already I'm trying to send a file using command line version of curl for windows like so: C:>curl -H "Content-Type:application/octet-stream" --data-binary @asdf.file http://server:1234/url Curl is adding headers which cause a 400 Bad Re...

Chrome MULTIPLE_CONTENT_LENGTH error

If I access my page directly, I get: $ wget http://localhost:8010/ --save-headers -O - --2010-10-29 18:30:24-- http://localhost:8010/ Resolving localhost (localhost)... 127.0.0.1 Connecting to localhost (localhost)|127.0.0.1|:8010... connected. HTTP request sent, awaiting response... 200 OK Length: 950 [text/html] Saving to: `STDOUT' H...

Why does Maven disable caching for HTTP requests?

The default Maven settings for HTTP requests, such as the ones Maven uses to fetch artifacts from repositories, include the following headers: Cache-control: no-cache Cache-store: no-store Pragma: no-cache Expires: 0 Accept-Encoding: gzip This seems to be the documented behavior. The default Maven wagon for HTTP (i.e., the "lightweig...

How to handle multiple cookies with the same name?

Say for example I had an application sending the following HTTP headers to set to cookie named "a": Set-Cookie: a=1;Path=/;Version=1 Set-Cookie: a=2;Path=/example;Version=1 If I access /example on the server both paths are valid, so I have two cookies named "a"! Since the browser doesn't send any path information, the two cookies cann...

Have to use back button twice in browsers (Firefox/Chrome/IE); extra # being added to URL

After experimenting with a handful of new addons for Firefox, I've managed to foul up some setting permanently. Using certain sites--take Netflix for example--upon clicking into a details page for a movie, I'll notice a #height1754 being added onto the end of the URL. When I use the back button, the only thing that happens is the ...

How to send and receive headers via PHP

I'd like to study how headers are sent and received. I know about PHP's header function and think I can just look at an actual request header (e.g. using Firebug) and make identical requests to a server (including spoofing the User-Agent). Is this correct? The other problem is how do I get the header responses back? I want to analyze t...

Java App to receive http PUT and Get request

Hi there, I am looking for advice on how to go about writing a small and simple application that will receive http GET and http PUT request, process the data (simple text files) and respond. I have all ready done this using threads and sockets but there must be a simpler and more efficient way. Also when I run my application using ...

What should be the reponse code when validation errors happen?

Hey, I'm implementing an API. The API accepts/returns JSON content type. Now, suppose that the data submitted by some POST request is not valid, like a missing attribute, or a duplication exists for the same data. What is the standard HTML response code in that case? ...

python/cgi - serves distorted images

Hello, I have been struggling for a couple hours now with serving jpg's with a python cgi site. For some reason the images always come out distorted. Here is my code: print('Content-type: image/jpg\n') path = 'C:\\Users\\Admin\\Documents\\image.jpg' print file(path, 'rb').read() This post describes a nearly identical problem, howeve...

How to prevent my HTTP server from "sleeping"?

I've written a very basic HTTP-based server program that runs in the background on my computer to allow me to automate various tasks from my Android (via HTTP requests in Tasker). This all works fine (barring this problem), except that after more than about 30 minutes of inactivity, the application ends up in a sort of sleep mode, and ta...

Getting around base64 encoding with WCF

I'm using WCF, REST and "pretty URI's" as shown in this blog post with the Online Template for VS 2010 .NET 4.0: http://christopherdeweese.com/blog2/post/drop-the-soap-wcf-rest-and-pretty-uris-in-net-4 I have one problem though. I want to return a a raw byte[] array but it automatically gets base64 encoded. Unfortunately for my program ...

Creating 2 http requests on the same connection

I would like to create 2 HTTP requests on the same connection (HTTP persistent connection). I'm using HttpWebRequest: WebRequest request = HttpWebRequest.Create("http://localhost:14890/Service1/3"); WebResponse response = request.GetResponse(); byte[] buffer = new byte[1024]; int x = response.GetRespons...

Garbage bytes in http output ?

When I use telnet to view my web, I get these weird numbers/letters in the output. This does not happen in a browser and they are definitely not in my source code. I have checked other sites and they do not have them. Any ideas why ? Are they garbage ? How can I get rid of them ? telnet www.mysite.com 80 GET / HTTP/1.1 Host www...

Is SPDY really used?

Does anyone see Google's SPDY used in production? Is there a way to detect if a website is communicating with my browser (provided it is a fresh Chrome) using SPDY? ...