hi all!
I'm using the following lines of code to make an http post call
NSData *imageData = UIImageJPEGRepresentation(image, 0.9);
NSString *urlString = @"http://169.254.225.91:8888/upload.php";
// setting up the request object now
NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease];
[request setURL:[NSURL ...
---[ejb request]--> bean -----[http request]----> host
I would like to invoke http client method (http put, get...) within a bean, but I want these beans, either MDB or stateless session bean, run as quick as possible (with extreme short life time).
Problem is, the http connection is too slow (especially when connecting to slow host...
I'm writing a client that is making repeated http requests for xml data that is changing over time. It looks like the Android stack is caching my page requests and returning the same page repeatedly. How do I make sure it gets a fresh page each time?
-- code ---
HttpClient client = new DefaultHttpClient();
HttpGet request = new HttpG...
I am building a RESTful data store and leveraging Conditional GET and PUT. During a conditional PUT the client can include the Etag from a previous GET on the resource and if the current representation doesn't match the server will return the HTTP status code of 412 (Precondition Failed). Note this is an Atom based server/protocol.
My...
Hi there,
What is the better approach for load balancing on web servers? My services run in .NET and Mono, so they could be hosted on IIS or Apache2, and the will have to provide SSL connection.
I've read two main approaches, store the state in a common server and use sticky sessions, there is any other else?
I've read 3 diffent thin...
The IETF recommends to use base64 encoding for binary cookie values.
http://tools.ietf.org/html/draft-ietf-httpstate-cookie-07
So I use setrawcookie(..) but I don't know what variable to use to get the cookie back because $_COOKIE[..] still uses the URL decoding that matches setcookie(..). This replaces "+" with " " in the output.
<?ph...
Apache webserver setup
added:
AddType application/x-mpegURL .m3u8
AddType video/MP2T .ts
to "httpd.conf" file.
Movie file preparation
I have 3 movie files (9mb - 25mb each).
Used QuickTime to convert movies into iPhone format.
Used mediafilesegmenter to convert .m4v into 10-second segments of .ts files, with an accompanying .m3u8 ...
Imagine we need to pass a a number structured objects to the web application - for instance, locale, layout settings and a definition of some query. This can be easily done with JSON or XML similar to the following fragment:
<Locale>en</Locale>
<Layout>
<Block id="header">hide</Block>
<Block id="footer">hide</Block>
<Block...
I downloaded a webpage in my python script.
In most cases, this works fine.
However, this one had a response header: GZIP encoding, and when I tried to print the source code of this web page, it had all symbols in my putty.
How do decode this to regular text?
...
I would like to know if the following is possible:
As part of the PageLoad of an ASP.Net page request:
Use HttpWebRequest (POST) to make a request to a forms authentication
webpage of a different web application
Examine the response to see if the authentication succeeded (identifiable if an authentication cookie has been set)
If it fa...
i am sending ajax requests after 5 seconds
and i have 3 types of requests to send
but after few request it starts errrors
401 access denied
501
how to overcome dis
...
Hi there,
I'm serving a python script through WSGI. The script accesses a web resource through urllib, computes the resource and then returns a value.
Problem is that urllib doesn't seem to handle many concurrent requests to a precise URL.
As soon as the requests go up to 30 concurrent request, the requests slow to a crawl! :(
Help...
Hi there,
I am implementing a CMS, the case is that the "Web-Editable" is in a different domain thus, I would be able just get the page using HttpRequest in order to copy and show it in the CMS server to make it able to change it (DOM just visual purpose) and save the changes to the CSS and JavaScript folder on the "Web-Editable" using ...
I have written a very simple IOCP HTTP server that works for the GET verb, but not POST.
I create a socket and a listen thread in which accept() is waiting for a connection.
When a client connects I call ioctlsocket() to unblock the socket then I associate the socket with IOCP and finally call WSARecv() to read the data.
Some data is i...
I'm using HttpRequest to download several pages from a website (in a loop). Simplifying it looks like this:
HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(
"http://sub.domain.com/something/" + someString
);
HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
//do something
I'm not quite sure ...
I'm implementing a REST service using WCF which will be used to upload very large files. The HTTP headers in this request will communicate information which will be validated prior to allowing the upload to proceed (things like permissions, available disk space, etc). It's possible this validation will fail resulting in an error respon...
What direction should I go in(libraries, documents)?
UPDATE
Can someone illustrate how to use winpcap to do the job?
UPDATE 2
How do I verify whether a packet is an HTTP one?
...
Hi,
I am writing a C program which needs to send back a HTTP Bad Response.
This is what I write to socket.
HTTP/1.1 400 Bad Request\r\n
Connection: close\r\n
\r\n
My question is why the broswer still spinning (like appear it is still loading something?
Am I missing header in the Http response? OR I miss something else?
Thank you.
...
I sometimes see one or the other in my server logs.
Thank You
...
I'm sending files in action helper for downloads (in parts if needed) like this:
...
$response->sendHeaders();
$chunksize = 1 * (1024 * 1024);
$bytesSent = 0;
if ($httpRange) {
fseek($file, $range);
}
while(!feof($file) &&
(!connection_aborted() &&
($bytesSent < $newLength))
) {
$buffer = fread($file, $chunksize);
// ...