http

Damaged data when gzipping

This is the script I have written for gzipping content on my site, which is located in 'gzip.php'. The way I use it is that on pages where I want to enable gzipping I include the file at the top and at the bottom I call the output function like this: print_gzipped_page('javascript') If the file is a css-file I use 'css' as the $type-a...

iPad/objective-C synchronous HTTP request example?

I can only find asynchronous iPad/objective C HTTP examples. How do I do a synchronous web request? ...

from http to https

I have a simple web app: a web page with a form to submit, and a servlet on the server side. It works. I am now asked to change it so that the address of the form changes from http://www.example.com/myForm.html to https://www.example.com/myForm.html What are the steps to do this? Do I have to change my servlet? My deployment? My web...

Is GET Query String affected by content='text/html; charset=gb2312' html meta tag attribute ?

The Question is, In a regular HTTP Request to a server (non-ajax), Is the Query String passed by GET method to some server, get affected by the encoding specified by this : <meta http-equiv='Content-Type' content='text/html; charset=gb2312'> If the answer is no, How to define the encoding schema for the parameters of GET method ? e...

HTTP authentication and filesend in C

i have some parsed data in two files. i need to send these to a webserver of a website. i also need to be logged into the webserver first. i am new to this web interaction thing. i just need to know how might i go about doing this. i am learning the libcurl library so i guess it can send standard HTTP POST messages. i will make a simple ...

How do I process multipart http responses in Ruby Net:HTTP?

There is so much information out there on how to generate multipart responses or do multipart file uploads. I can't seem to find any information on how to process a multipart http response. Here is some IRB output from a multipart http response I am working with. >> response.http.content_type => "multipart/related" >> response.http.bod...

Help with HTTP Intercepting Proxy in Ruby?

I have the beginnings of an HTTP Intercepting Proxy written in Ruby: require 'socket' # Get sockets from stdlib server = TCPServer.open(8080) # Socket to listen on port 8080 loop { # Servers run forever Thread.start(server.accept) do |client| puts "** Got connection!" @output = "" ...

Silverlight 4 calling Http Auth protected SOAP Webservice

I need to call a SOAP Webservice in Silverlight 4 which is protected by HTTP Basic Auth. The service is hosted on a different domain than the silverlight application. Is there any way to do this. Setting ClientCredentials.Username doesn't work for me ... Any suggestions? ...

Make HTTP/1.1 request with PHP

My code is using file_get_contents() to make GET requests to an API endpoint. It looks like it is using HTTP/1.0 and my sysadmin says I need to use HTTP/1.1. How can I make an HTTP/1.1 request? Do I need to use curl or is there a better/easier way? Update I decided to use cURL since I am using PHP 5.1.6. I ended up forcing HTTP/1.1 by ...

Should I aim for fewer HTTP requests or more cacheable CSS files?

We're being told that fewer HTTP requests per page load is a Good Thing. The extreme form of that for CSS would be to have a single, unique CSS file per page, with any shared site-wide styles duplicated in each file. But there's a trade off there. If you have separate shared global CSS files, they can be cached once when the front pag...

How could I embed a html/css/js view in a webstart application

I would like to use a html/css/js view in my webstart project without requesting all permissions. I figured out that I could use the java HTTPServer to process the requests but I need a way to avoid using real sockets, so that the HTTPServer instantiation doesn't ask for some permission. Do you know any projects that achieve that ? and...

HTTP 500 ERROR on CAS Server while setting SSLVerifyClent as "required"

I have 3 servers, a Apache Server, a JBOSS Server and a CAS Server for SSO. The Apache Server resolve all request with a domain such as www.request.com, and the path of CAS Server is www.request.com/cas, and JBOSS Server is www.request.com/jboss (This app got a CAS client). My problem is if I set SSLVerifyClient require for the Name...

httpUnit class not found

I am trying httpUnit for the first time and just trying to get a response back from google.com. However, I keep getting the following error: com.meterware.httpunit.dom.HTMLDocumentImpl not found Though, I have placed httpUnit.jar in the libraries folder of my NetBeans project and can actually see that class file is there. Any experi...

The number of HTTP requests need to be made for downing a webpage?

Are all assets (html files, js files, css files, images) in one webpage transmitted through a single HTTP request/response, or through multiple HTTP requests/responses, one for each asset? Assumed no XHR in that webpage. ...

HTTP gateway timeout

Hi buddies, When I tried to request the data across the internet through a web service I received an error as: Error: The request failed with HTTP status 504: Gateway Time-out. Can anyone please give an insight about this error, and a solution too? Thanks in advance. ...

Https and Frames. Is connection encrypted?

Hello all. If I have a frame embedded into a html page. The page connects through http. My question is: If my frame connects through https is the connection and everything still encrypted despite the fact that the container page connects through http? UPDATE: Thank you everyone. So it is encrypted :) ...

problem with get http request from IPhone

Hi, I am writing a sample PHP Web Service that is sending GET Http request from the iphone to the web server. The server side code is returning JSON Data to iphone, the server side code looks like: function getUsers(){ $con=mysql_connect("localhost","root","123456") or die(mysql_error()); if(!mysql_select_db("eventsfast",$con)) { ...

Multiple requests to server question

I have a DB with user accounts information. I've scheduled a CRON job which updates the DB with every new user data it fetches from their accounts. I was thinking that this may cause a problem since all requests are coming from the same IP address and the server may block requests from that IP address. Is this the case? If so, how do ...

Dealing with multiple parameters in Nginx rewrite

I have a rewrite that nginx calls like so: location ~* (css)$ { rewrite ^(.*),(.*)$ /min/index.php?f=$1,/min/$2 last; } And it's used on pages like this: http://domain.com/min/framework.css,dropdown.css Works all fine and dandy, but it's not scalable. Adding another element to the URL means I have to directly edit t...

[Javascript] Linux Ajax (mootools Request.JSON) Header error

Hi all, I use the following code to get some json data: var request = new Request.JSON( { 'url': sourceURI, 'onSuccess': onPageData } ); request.get(); Request.JSON is a class from Mootools (a javascript library). But on linux (ubuntu on firefox 3.5 and Chrome) the request always fails. So i tried to ...