http

How do I access HTTP request headers in HTTP::Server::Simple::CGI?

Hi! I'm using HTTP::Server::Simple::CGI for a light-weight HTTP server. That gives me a CGI object in a callback function when a HTTP request is accepted. How can I access the incoming HTTP headers, especially non-standard headers? The environment variables are only the standard ones. cgi->param gives me only the form parameters. Tha...

POST doesn't seem to work with my form from HttpURLConnection

I am trying to log into a reports system using java. So far, I have tried MANY different implementations that have used HttpURLConnection. The HTML I am trying to post to boils down to: <form name="logonForm" method="POST" action="http://remoteserver/logon.object"&gt; <input type="hidden" name="qryStr" value=""> <input type="hidden" na...

Content-Disposition header missing at client

I have a php add which calls LaTeX then passes the PDF to the browser. Since my users will be paying for this service, I want to make sure they are given the option to save the PDF rather than hitting my server again and again. exec("cd tex && latex {$_SESSION['sen_id']}.tex && pdflatex {$_SESSION['sen_id']}.tex", $output); $pdf = subst...

Standard for adding multiple values of a single HTTP Header to a request or response

If I want to add a list of values as an HTTP Header, is there a standard way to do this? I couldn't find anything (that I could easily understand) in RFC 822. For example, is comma separated values standard or semi-colon separated values. Is there a standard at all? Example: Key: value1;value2;value3 ...

PHP: When submitting an HTML form, does the HTTP_REFERER get set?

An exception was thrown in my application, but the HTTP_REFERER was null, which seems strange in this case. I'm wondering if you could answer a quick question: So I've got this form: <!-- mysite.com/index.html --> <form action="http://mysite.com/somewhere/else"&gt; <input type="submit" /> </form> When someone submits the form, ...

Script to determine if an HTTP reponse is from intended domain.

I am trying to write a script that will send an HTTP "GET" to a URL then determine if the response came from the same domain or not. I have been playing around with VBS and the WinHttp.WinHttpRequest.5.1 object. Sadly this does not give me any access to where exactly the response came from. I tried parsing through the response header...

file_get_content failed to open stream: Connection refused

I am trying to access a second server with file_get_content and simple_load_xml and I get failed to open stream: Connection refused What can be the result? allow_url_fopen=Yes allow_url_include=Off is my php.ini values ...

Sending bytes via a servlet, getting " HTTP method GET is not supported by this URL"

I have the following code... @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { super.doGet(req, resp); final int idValue = Integer.parseInt(req.getParameter("id")); final ProjectRunEntity projectRunEntity = projectDataService.findProjectR...

Erlang HTTP: How do you include Body in an Inets or Ibrowse request?

I am currently using Inets with the following request:    http:request(put, {Url, [{"User-Agent", UA}, {"Content-type", "application/json"}]}, Bodytext, []), But the request fails. Any suggestions? ...

how to spoof http referer

Hi As of current, are there still any methods to spoof http referer? thank you. ...

HTTP request in Javascript

Should this code not work? I actually have no idea how to use this HTTP request thing. <script language="javascript"> function HTTPCALL() { var request = HTTP.newRequest(); request.open("POST", "https://workplace.intuit.com/db/main", false); request.setRequestHeader("Content-Type", "application/xml"); request.setRequestH...

using file based URIs or not

Of course, the traditional method is to let the filesystem and your webserver work out the urls. E.G., www.example.com/index.html -> /var/www/public_html/index.html But I've noticed a trend in which, as opposed to letting the webserver do the mapping for you, you do it yourself (e.g., Rails and its routes config file, so /index is mappe...

Avoid This collection already contains an address with scheme http

Hi all, I have this issue: I have WebSite with asp.net pages. http://desiis:90/WebSite1 In this webSite, I have a Service WCF (service1.svc). http://desiis:90/WebSite1/services/Service1.svc When I call to the service, I get this error: This collection already contains an address with scheme http In my localhost all is OK. any s...

How to compress HTTP response headers?

At the Velocity 2010 conference, Google said that header compression can yield big gains: Hölzle noted a glaring inefficiency in the handling of web page headers, which provide information about a user’s IP address, browser and other session data. The average web page makes 44 calls to different resources, with many of those requests...

Speed performance: Reduce HTTP requests or not?

Hi everybody, A theoretical question: We all know about the pro's of minifying and combining javascript files in order to reduce HTTP requests to speed up a website. But when popular javascript libraries is used (jQuery for instance), it isn't too stupid to assume that these already have been downloaded to the clients computer from anot...

What are the key-value pairs on a form which finally get POST'ed?

I have looked in stackoverflow and googled for this question but havent found anything relevant. Given a web-page with a form, which is possibly implemented through loads of javascript/.NET etc... I am trying to get the list of key-value pairs that I need to pass to it so that my program (lets say, using curl) can perform an HTTP POST. A...

Downloading a ftp link though a script that changes the address to http

I wrote a script in tcl to grab links out of the download portion of a huge document checking for http:// and ftp:// as links to download. All of the ftp:// links don't require password/username and instead of handling them in separate cases (passing ftp:// to one download method and http:// to another download method) I would just pass ...

GIT + HTTP fails across network

Hi, As a follow on from this question on SO, I have been working with yysun's great handler-based solution for web access for GIT on a IIS platform. Their solution works perfectly when used locally on my machine (i.e. win 7, iis 7.5, .NET 4.0), but fails across the network. Unfortunately, I need to have this running on a remote VM with...

Convert HTTP Proxy to HTTPS Proxy in Twisted

Hey, Recently I have been playing around with the HTTP Proxy in twisted. After much trial and error I think I finally I have something working. What I want to know though, is how, if it is possible, do I expand this proxy to also be able to handle HTTPS pages? Here is what I've got so far: from twisted.internet import reactor from twist...

How can I confirm that an HTTP POST calls my code?

I'm trying to retrieve data from a POST method, code as follows: -(void)postXMLFeed:(NSString *)XMLStrPost { //NSLog (@"XML Feed3: ", XMLStrPost); NSURL *url = [NSURL URLWithString:@"http://xxx.xxx.x.xxx/stephen/sync_upload.php"]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; [request setVa...