http

C# HTTP request Max connections

Hi all, We have a number of webservers(15) and for each server have a number of URLs(30). I have written a Windows Desktop app that goes out and hits each server and each url combo. (using the httpWebRequest.Proxy to do this). It's usually just for 2 servers at a time. So a total of 60 requests. The first problem was the 2 connection li...

RESTEasy client framework authentication credentials

I looked for the ways, how a client can send authentication credentials to a webservice (e.g. Tomcat Manager) and found this topic http://stackoverflow.com/questions/1885844/resteasy-client-framework-authentication-credentials Just have some questions after reading: 1. Are there other possibilities to do that? 2. What imports are neede...

Custom JSON IErrorHandler in WCF returning StatusCode 200/504 when should return 400

Hi! I have a WCF service that among other bindings also uses WebHttpBinding for JSON inputs/results. I made a custom IErrorHandler implementation in order to be able to set the StatusCode to 400 when something goes wrong and also return a JSON understandable message. It´s the straight implementation that you can find everywhere (nice w...

Tunneling through HTTP

WRITTEN IN JAVA Im creating a program that connects to a proxy and then tunneling to another server to send TCP packets, this is my code: { Socket skt = new Socket(proxy_address, proxy_port); PrintStream myOutput = new PrintStream(skt.getOutputStream()); String Request = "CONNECT " + host + ":" + 443 + " HTTP/1.0"; String host3 = "Hos...

Calling JSF ManageBean after PageLoad using f:event postAddToView

Hi Guys, I am writing an app using JSF 2.0. For one of the page, there is a section of the page that takes a long time to display. To improve the user experience, I am thinking to load the page first and then automatically do an Ajax call back to the JSF manage bean object once the page is loaded successfully after 1st load. I am t...

What is the boundary in multipart/form-data?

Hi, everyone, I want to ask a question about the multipart/form-data. In the HTTP header, I find that the Content-Type: multipart/form-data; boundary=???. Is the ??? free define by the user? or it is general from the HTML? Is it possible for me to define the ??? = abcdefg? Thank you. ...

how to decode HTTP request headers and body in Python 3?

i am writing an experimental asynchronous web server. i am wondering about the standard / 'best' way to decode HTTP requests in python? basically what reading from the socket gives me is a bytes representation of the incoming request raw data; how can i turn these into standard datatypes like dictionaries, lists of values, and so on? i...

Multipart POST request not being recognized

Hi everyone, I'm building a multipart/form-data request and have been having trouble getting it to work. Here's what I'm sending: POST /post.php HTTP/1.1 Accept: */* Accept-Encoding: gzip, deflate Accept-Language: en-us Connection: keep-alive Cookie: <a cookie> Host: myserver.com Content-Type: multipart/form-data; boundary=1850FEA3-AE...

Why is PHP not interpreted in FF but is interpreted in Chrome on my website?

Look at this URL in Chrome and Firefox. http://gymshuffle.com/contact.html If FF, there's uninterpreted PHP code on the page. In Chrome there isn't. What would cause the PHP to display in Firefox? ...

How to get the "query string" from a QUrl?

I have a QUrl and I need to extract the path+file+params. Basically everything but the hostname - what would be requested via HTTP. I looked through the Qt 4.6 docs but I couldn't find anything that looked like it would do this. What method(s) would I call? ...

Why do I get the proper URL response from a browser, but empty within Android's "HttpGet"?

I am writing an android application which uses a REST-based API on the server. So far the login works perfectly using HttpGet = I send the credentials, it sends me back a JSON response object containing session id or failure. I then moved onto using another get api (this one is passed the sessionid) and the response I get back looks like...

Set Host-header when using Python and urllib2

I'm using my own resolver and would like to use urllib2 to just connect to the IP (no resolving in urllib2) and I would like set the HTTP Host-header myself. But urllib2 is just ignoring my Host-header: txheaders = { 'User-Agent': UA, "Host: ": nohttp_url } robots = urllib2.Request("http://" + ip + "/robots.txt", txdata, txheaders) ...

UrlReferrer shows a value with hyperlink but null with Response.Redirect

I am redirecting between two pages, when I use a hyperlink I get the Page1 in the UrlReferrer field, but using Response.Redirect gives it null. AFAIK both of them act similarly for a redirection. Can anyone help me understand this behaviour? Thanks for the help! ...

Cocoa Touch: How to detect a missing file on the download server

My iOS app downloads document files from a server using the NSURLConnection class. I use it asynchronously. It can happen that a document is missing from the server (configuration error). I expected NSURLConnection to call my delegate error method: - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error But...

Python Server Help

I have written a small HTTP server and everything is working fine locally, but I am not able to connect to the server from any other computer, including other computers on the network. I'm not sure if it is a server problem, or if I just need to make some adjustments to Windows. I turned the firewall off, so that can't be the probelm. I...

405 - HTTP verb used to access this page is not allowed

Hi, I have developed a site in ASP.NET 3.5 I had deployed it on Windows server 2008 and iis7. I was using evaluation version of Windows server 2008. Day before yesterday the evalution period expired and I formatted my machine and re-installed the Windows server 2008. Now, when I deploy the site on IIS7 and try to access it then I get ...

my GET variable is being escaped?

I'm really confused here, can someone explain this to me? request: http://example.com/test.php?var=String's $a = $_GET["var"]; $b = "String's"; echo $a . "<br/>"; echo $b . "<br/>"; $output = mysql_real_escape_string($a); $output = mysql_real_escape_string($b); echo "<hr/>"; echo $a . "<br/>"; echo $b . "<br/>"; result: String\'...

php socket http post not working

I'm trying to write a php script to send a http post request to a url. It doesnt seem to pass through for the server is not receiving it. Can anyone help? <?php function postXMLToURL ($server, $path, $xmlDocument) { $xmlSource = $xmlDocument; $contentLength = strlen($xmlSource); //$fp = fsockopen($server, 80); $fp = ...

Why does FireFox 3.6.8 not cache static contents from asp.net developer server?

I am working on a asp.net web site, like normal user, we use asp.net developer server during coding and testing. Today, I found the firefox not cache any static file of my site, since our application is pretty big, it made page load time very slow. I checked firefox about:cache, all the static file cache setting looks like Ke...

A distinct HTTP status for not logged in vs. not authorized in a RESTful API

So send a few different status headers in my API including 404, 409, 201, 302 and the like. Now I'm running into issues with 401 Unauthorized. I'm currently sending it if a user is not logged in (the entire API is rights managed) or if a user doesn't satisfy the specific access requirements for the particular resource being retrieved/mod...