http

Android emulator to communicate with pc emulator running on

I have an application that I will run on two separate emulators. This application uses httpclient to communicate to the server application, that I will run on the same computer as the emulators are running. "localhost" for the android emulator wont work as local would be the emulator itself. The computer will not be connected to a lap...

Using Cucumber/Capybara in Rails 3, how do I set a custom User-Agent string?

In my Rails 3 app, I have different layouts for iPhone vs desktop browsers. I'm trying to test the iPhone layout using Cucumber/Capybara. So far, all my attempts at setting an iPhone User-Agent string in the request's HTTP header have failed. I have followed the Testing custom headers and ssl with Cucumber and Capybara tutorial but it d...

How do i get Firefox to send HTTP Referer data to an embedded flash player?

I want to stream some videos, and have it all done up for flash, but don't want them to be accessed by outsiders, so i have the server set so that only if the right http_referer is set that it works. but firefox doesn't work properly for some reason. the most frustrating thing about this is that it even works in IE. Any help would be ...

Disassemble HTTP Response (C)

Hi, In continuation of this question I ask the following question. I've managed to read and understand what D.Shawley has recommended and I already finished a lot of work. But a problem occured to me again. I've managed to get the Content-Length of the page out of the HTTP response, but now I'm experiencing some problems with getting th...

Connect to web that requires user/password

Hi,I'm a bit new to Java and more to connections stuff with it. I'm trying to create a program to connect to a website ("www.buybackprofesional.com") where I would like to download pictures and get some text from cars (after the login you have to enter a plate number to access a car's file). This is what I have right now, but it always ...

return a specific http status code with php

Is there a way to have a php script return a specific http status code rather than relying on apache to do it? ...

Is it preferable to preserve web application state with JSON in URL?

You could preserve web application state with JSON in URL like this: http://host/?state=[{id:1,selected=true},{id:2,selected=false}] Is this preferable? One motivation for doing something like this is if the user bookmarks the web page the web application state can be restored the next time the user visits the page. ...

How to make html request without full page reload and without ajax

I saw that facebook is doing that. if you look in the chrome inspector they keep on adding "html documents elements" when you navigate on diferent pages. I also noticed that google dose this also. My intention is to make my PHP+DOM load faster under 200 ms from website backed. It's some web server thing? I'm using php with apache. T...

javascript redirecting to main window doesn't take into account http option (&)

hello, i'm triying to use javascript redirect to main window after log in succeed in an iframe. this is my code : if ($_GET['redirect']!='') { $redirect=$_GET['redirect']; $smart->assign('redirect',$redirect); } $redirect=$_GET['redirect']; echo $redirect; if(isset ($_SESSION['user'])&&$_SESSION['user']!='') { $user->...

Why is Cookie available in Request immediately after setting using Response?

In pageload, if you do Response.Cookies.Add(..., immediately in the next line, you can access that cookie via Request.Cookies(... I know that under the covers, the cookie is added to Request.Cookies by .net, but the original request never had that cookie. If what I'm saying is correct, why is it this way? Shouldn't the cookie be avail...

Getting header response code

This is part of a PHP script I am putting together. Basically a domain ($domain1) is defined in a form and a different message is displayed, based on the response code from the server. However, I am having issues getting it to work. The 3 digit response code is all I am interested in. Here is what I have so far: function get_http_...

How to implement cookies in Ruby Net::HTTP

That's my code. Now I need to SEND a cookie to the host but I can't find a solution. def get_network_file(url=nil) begin http = Net::HTTP.new( @service_server, 80 ) resp, data = http.get( url, { "Accept-Language" => @locale } ) if resp.code.to_i != 200 RAILS_DEFAULT_LOGGER.error "*** return code != 200. code = #{...

CGI to Handle Multiple Requests on a Persistent HTTP Connection

CGI programs typically get a single HTTP request. HTTP 1.1 supports persistent HTTP connections whereby multiple HTTP requests/responses are made w/o closing the connection. Is there a way for a CGI program (or similar mechanism) to handle multiple HTTP requests/responses on the same connection? I am using Apache httpd. ...

read post request values HttpHandler

Hi, I'm writing a little Java app which implements an http service that receives http post commands from a client. The class I'm using to implement all of this is HttpHandler and HttpServer in the com.sun.net. package. Now I'm implementing an handle(HttpExchange exchange) function which handles the request, and I'm having truble readi...

Download only new/modified files with perl (or wget)

I have a Perl script which downloads a large number of files from a remote server. I'd like to avoid hammering the server, so I'd like to avoid downloading a file if it hasn't been modified since my last check. Is there a good way to do this, either in Perl or with a shell script? Can I get the server to send HTTP 304 rather than HTTP ...

How to access a FDF through a java HTTP request

I have a PDF form with a submit button. The submit button action is set up to send the FDF with the content fields to a URL. A java class is run when this URL is accessed. There is a field in the PDF called FName. When I use the Http Request object to get the field FName null is returned. How can I access the FDF data in my java class....

Java multithreaded file downloading performance

Having recently worked on a project which required some more IO interaction than I'm used to, I felt like I wanted to look past the regular libraries (Commons IO, in particular) and tackle some more in depth IO issues. As an academic test, I decided to implement a basic, multi-threaded HTTP downloader. The idea is simple: provide a URL ...

How to to store http-cookies between sessions

I'm developing an app that logs into a web site. To do this I use the HttpClient object. I noticed I could get all the cookies from the post requests with the HttClient.getCookieStore method, the question is however how I save these cookies so the next time the app is started, the user don't have to log in. I should also mention that w...

How do you determine cookies are disabled *without* javascript and *without* redirecting?

If I disable javascript and cookies, Amazon.com detects that cookies are disabled without a redirect. If you click the cart link, there's only a get on the cart page. I'm guessing amazon.com is most likely not using ASP.NET, but how would you accomplish detecting disabled cookies using ASP.NET without the use of javascript and redirect...

sniff http packets for get and post requests from an application

Iam coding a SEO tool in C# for doing keyword research. I need to make calls to google adword keyword tool. Now I know some tools which are doing the same already. I just need to decipher what they are doing. I tried using wireshark but its very complex to get the actual post data etc using wireshark. I tried using fiddler on IE but se...