I have a web application that uses RESTful url patterns. Currently if a users tries to access a page where they need to be authenticated it just returns nothing. Is it good practice to return the HTTP status code in this case? Would I use 403 or a different one?
...
I've been reading some posts about web performance, one of the points is to
serve static content from a cookie-free domain, my question is:
Can I share cookies between, let's say example.com and www.example.com, while excluding static1.example.com, static2.example.com, etc?
Or do I need to set a different top level domain?
I know (or ...
I've the following condition to check the user agent.
if request.env['HTTP_USER_AGENT'] =~ /feedburner/i
@posts = Post.recent(10)
render :layout => false
else
redirect_to 'http://feeds.feedburner.com/MyAppFeed'
end
Its working fine. Now I need to check for the facebook user agent!
What would be the name of facebook user agent or i...
Hi,
I'd like to setup RMI to pass through port 80 on a java servlet.. (To pass through the firewall)
I have a Tomcat server and i'm looking for the module that will catch the RMI http request and pass it to the RMI layer on the server machine.
I've read that RMI automatically handles this on it's side.
Is there a step-by-step guide to ...
Following on this question I am actually in the phase of finding the right HTTP container for one of my projects, too. I looked at several containers but I'm still not sure which one will be best suited for high load AJAX only requests. Apache Mina looks quite promising, but relatively complex as well. The asynchronous web server impleme...
I happens to find that, when a live space page is loaded, inline images are fetched by https protocol instead of http protocol.
This doesn't make sense. The text part of live space is not fetched by https, why images are fetched with https? I bet the https way to fetch image just make the page loaded slower.
Is there any special advant...
I have found some code `
require 'socket'
host = "download.thinkbroadband.com"
path = "/1GB.zip" # get 1gb sample file
request = "GET #{path} HTTP/1.0\r\n\r\n"
socket = TCPSocket.open(host,80)
socket.print(request)
# find beginning of response body
buffer = ""
while !buffer.match("\r\n\r\n") do
buffer += socket.read(1)
end
response ...
Hi,
Is it possible to load a page through UIWebView with POST parameters?
I can probably just load an embedded form with the parameters and fill them in with javascript and force a submit, but is there a cleaner and faster way?
Thanks!
...
A small program of mine just broke because, it seems, the site I was programmatically browsing now assumes a Java request comes from a mobile phone, and the link I was looking for is not on their mobile page.
So I want to fake an Internet Explorer access. How do I do that with java.net?
...
I'm trying to set the Accept HTTP header to "text/xml" with this jquery code:
$.ajax({
beforeSend: function(req) {
req.setRequestHeader("Accept", "text/xml");
},
type:"GET",
url: "[proper url]",
contentType: "text/plain; charset=utf-8",
dataType: ($.browser.msie) ? "text" : "xml",
username: '---',
password: '-------', ...
I've got a situation where I have two different webapps running on a single server, using different ports. They're both running Java's Jetty servlet container, so they both use a cookie parameter named JSESSIONID to track the session id. These two webapps are fighting over the session id.
Open a Firefox tab, and go to WebApp1
WebApp1's...
How do I obtain the HTTP headers in response to a POST request I made with PHP?
...
I'm trying to get my arduino with ethernet shield set up as a server to understand GET and POST requests. I found this, and could modify it to meet my needs, but was wondering if something already exists in C++ that is extremely lightweight and might already be commonly used for arduinos with ethernet shields.
...
I'm trying to interface with a 3rd party website, and the communication goes as follows.
Send this request
POST /Service/LabelService.asmx/GetLabelXML HTTP/1.1
Host: www.host.com
Content-Type: application/x-www-form-urlencoded
Content-Length: length
labelRequestXML=<LabelRequest> ... </LabelRequest>
Receive this response
HTTP/1.1 ...
Hi,
i want to pass large variables to a PHP script on another server with http like:
"example.com/get.php?data=this is quite alot data..."
I always get the server(apache) response: "Request-URI Too Large"
Any ideas hot to pass the big variables to that script?
...
I've got 2 ASP pages.
I do a request to the first page from Firefox (which takes 30 seconds to process on server-side), and during the execution of 30 seconds I do another request from Firefox to the second page (takes less than 1 second in server-side), but it does come after 31 second. Because it waits first requests to finish.
When ...
I'm trying to debug some screen scraping that I'm doing by capturing the POST request made by firefox and comparing it to the one that my script does, however I'm having some trouble capturing that POST request with YATT:
If I set YATT to use Raw Socket Packet Capture with the IP address that appears to be my external IP address then I ...
We have 3 HTTP Compression available in IIS 7.0
GZIP Encoding
DEFLATE Encoding
BZIP2 Encoding
What are the difference between these three? Which is the best compression for security and performance?
...
The following headers work on IE but not on FF
<%@ Page Language="C#" ContentType="text/csv" Inherits="System.Web.Mvc.ViewPage"%>
<% Response.AddHeader("Content-Disposition", "filename=report.csv;attachment"); %>
In FF the suggested name in FF appears as "report" without the extension.
...
I'm trying to retrieve my contacts using curl. I've succeeded in getting my authToken, and now am getting an error stating that I need to set the content-length in the header, but when I set the content length to 0 I get a "bad request" error.
Does anyone know what the content length is? Is it the length of the Auth key? or the length o...