http

Correct http response to video stream

Hi! I'm currently developing my own little http server for video streaming, and i can't for the life of me figure out how this actually works... This is the request i get from the client: "GET / HTTP/1.1 Host: 127.0.0.1:8080 Accept: / User-Agent: QuickTime.7.6.6 (qtver=7.6.6;cpu=IA32;os=Mac 10.6.4) Connection: close " ...

Send ASCII string using HTTP Post

Part 1) I have a bitmap/jpeg image. I need to convert this image into an ASCII string (because I need to hash it) How is this conversion to ASCII done? Part 2) Then, I need to send this ASCII string from client to server using HTTP Post. From what I understand, I can only send data as a byte array using HTTP Post. How can I send an ASC...

Determine HTTP Protocol Version in ASHX Handler

Is it possible to determine the HTTP protocol version (e.g. 1.0 vs. 1.1) used for a request within a .ashx handler? I can see all of the header information except for the version in Request.Params. If not, what avenues are available to discover the HTTP protocol version when processing an HTTP request in ASP.Net? ...

How do web servers avoid TIME_WAIT?

I'm writing a simple HTTP server and learning about TIME_WAIT. How do real web servers in heavy environments handle requests from thousands of users without all the sockets getting stuck in TIME_WAIT after a request is handled? (Not asking about keep-alive -- that would help for a single client, but not for thousands of different clien...

Programmatically send username & password to Apache web server

I currently need to access an API that is set up in an staging environment on an Apache web server but the web server throws up a username/password dialog when browsing to the API url. Unfortunately I do not have access or control over the behavior of this web server. Is it possible to programmatically send the username and password to ...

Session sharing issue

I am facing an issue when we are using multiple tabs since its sharing the same session. Any alternatives to this? Can we create a unique session when someone uses the tab or CTRL+N. It's a JEE/Struts2 enterprise application if this matters. ...

Send ASCII string using HTTP Post

I'm currently sending image data over as a byte array. However, I wish to send it over as ASCII string. How can I send an ASCII string from client to server using HTTP POST in c#? HttpWebRequest webRequest = null; webRequest = (HttpWebRequest)HttpWebRequest.Create("http://192.168.1.2/"); webRequest.ContentType = "applicat...

How to turn a PHP script into a proxy server?

Hi, We all know that HTTP uses port 80, what if i put my server's ip and the port 80 in the browser's proxy setting, will the browser sends the HTTP requests to my index.php which will fetch the website from server side and return response headers and body? Thanks ...

Help with Google Code Issue Tracker API

Long story short: I'm trying to post comments and create issues onto Google Code via an Android App called Abugadro. I followed a very similar piece of code here: http://stackoverflow.com/questions/3254330/google-spreadsheet-api-update-edit-with-protocol When trying to post a comment onto the API, I've gotten various errors like 403 ...

Python: How to write to http input stream

I could see a couple of examples to read from the http stream. But how to write to a http input stream using python? ...

PHP PayPal payment verification / HTTP POST?

I am working on a software project and have written a validation system to help prevent theft of the software. I was reading back through the code, and found a huge "loophole" that could potentially allow the motiviated users to copy the program and install it without even contacting the activation server. So, I modified the program and ...

Submitting a ruby gem via the API fails with HTTP error code 422

Hi, I'm trying to upload my FAKE project (http://github.com/forki/FAKE) to RubyGems from F#: let mutable rubyGems = "http://rubygems.org/api/v1/gems" let PushGem gemFileName authCode = let client = new System.Net.WebClient() client.Headers.Add(Net.HttpRequestHeader.Authorization,authCode) logfn "Uploading gem %s to %s." ...

My client queries my server. If the response is negative (e.g. error) how should I communicate it?

Should I rely on http status codes? Or should I use some kind of special response? My server is running PHP and producing simple JSON responses. ...

Use HttpListener to get format of incoming data in .net

I am writing a server-side program. I created a HttpListener to listen for incoming requests. How can I find out what kind of data is being sent in? E.g. is it a text, image, pdf, word? Pls correct my code below if it is wrong. I'm really new to this and my understanding of the HTTP concepts may be wrong. Thanks. main() { HttpListener ...

How can i debug HTTP sessions using Fiddler, just like i did with TcpView ?

Hello. Im trying to stop using TcpTrace and start working with Fiddler. But i just can't setup fiddler to just start listening specified port and redirect all requests to the specified WS with another port. All i want is just redirect and monitor all traffic from localhost:4747 -> webservice-ip:10000 Is there any solution for my probl...

socket open to http url and retrieve a data

I would like to open a socket to http url (https://www.abc.co.uk:8433/open/url/client?username=123&password=456) using socket and connect and recv methods of socket.h. The problems are that the url is using 8433 port and the remaining url (/open/url/client?username=123&password=456). Also using https url. Dose anyone know how to do...

What's Wrong With This HTTP/1.1 Request? Sometimes the Client Accepts it, and Sometimes it Rejects it.

I am in the process of writing a small HTTP/1.1 web server. I have threading turned off and am not currently using persistent connections. For normal requests where I specify the Content-Length and write the bytes out to the socket, everything works great. However, I need the ability to support chunked transfer encoding. When some of th...

FTP User Isolation

Hi, I have a website set up as an FTP server too. I want to use the FTP server to allow to access content from a folder outside the root. I guess this could set up easily by adding a virtual directory. Problem is that I dont want the users to see this outside folder by browsing to the site by http. Is this possible? Thanks ...

how to have apache always return code 200 with data instead of 304?

Hello all, I would like to have Apache HTTPD return response code 200 with data of resource request via a GET instead of returning response code 304 with no data. Any one have an idea how to do that? Thanks in advance ...

How redirect user with all variables coming with POST

I have a html form with action="script1.php" In script1 I need write all data to the database and redirect to script2.php, but I need all parameters posted to script1 to be sent to script2. mod_rewrite is on How I can redirect using PHP with all data come through POST ? if i do like that this disgusting practice but <SCRIPT LANGUAGE...