http

Java web server and PDF files

I have created my own HTTP server. I need to return a PDF file (generated by Jasper Reports) to the web browser. However, when I read the PDF file and write its contents to the socket, the web browser receives a blank PDF file. When I save this file and compare it to the original, I see that many of the characters have been converted ...

How to limit upload file size in Wicket

How to limit file size in uploads in Apache Wicket version 1.4? I am using FileUploadField to handle upload with normal form submit without any Ajax stuff. Is it enough to use Form.setMaxSize() to limit the size of uploaded file? If too large file is uploaded, the browser will upload the whole file and Wicket will create validation er...

IIS6 not doing gzip compression when including Via header in request

I have some static content going through a CDN. I am using IIS6's built in compression (gzip & deflate) for static content and this is working fine when I request it. However, when the CDN makes the initial request for the content, it is not being returned compressed. They therefore don't have compressed content to forward to people r...

How to determine whether a web page has RSS or not in C#

Hello all, I have a task to do. I need to download a web page and to see if the page contains any RSS feeds. I know how to download a web page to string using Http APIs in C#, but how can I determine the http page string contains any RSS feeds or not? Thanks Jack ...

Switched to Snow Leopard: HTTP-Requests stopped working in simulator (WebApp)

Hi! I've created a web app in Mac OS 10.5 which receives data by sending http requests like this: var http = new XMLHttpRequest(); var url = "http://www.test1234.com/data.php?param1=" + param1 + "&param2=" + param2 + "&param3=" + param3; http.onreadystatechange= function() { var result= null; switch(http.readyState) { ...

Detecting the browser language of choice with PHP

Hello guys, I'm trying to implement this code to have different files to load for german, spanish or english browser languages of choice. The case is that with my spanish IE I still get the english file. <?php if (is_home()) { if (preg_match('/de-DE/i', $_SERVER['HTTP_ACCEPT_LANGUAGE'])) { include(TEMPLATEPATH . '/german-navbar.p...

Httpcontext working problem with AJAX

I am currently using AJAX control and also using httpcontext to redirect the page if the user is not authenticated.if two users are logged in at the same time and one deltes the other one. The other logged in user is getting exception page while clicking on the same AJAX control. So Looks like HttpContext is not working with AJX. I have...

Inspect network traffic from simple linux cli app

I'm running a small app on the command line, and I'm trying to watch the (http) network traffic it creates. Is there some kind of wrapper program (like 'time', or 'watch') which can display all network traffic to and from my app? (Or at least, make a copy of it in a file) ...

Cached image problem

Hey all. Right, my problem is that I need to replace an image that appears on every page of a site, which is fine, the problem is I want every user to see the new image and not a cached version of the old one. This is made especially difficult because I can’t make any code changes (far too many places to do it for it to be viable) so I...

.NET Web Scripting

I'm attempting to right a script to logon (username and password) on to a website and download a file. I've tried using the webClient and webBrowser classes to no avail, they don't seem to work for what I need them to do. Does anyone else have any suggestions? ...

Actionscript NetStream.play drops port in relative URLs

Hi, the current page my flash application is running from is http://localhost:3000/. I'm trying to play a video using NetStream.play(relativeURL) by using a relative URL (e.g. "myVideo.flv"), but when I look at the actual request made by actionscript, it's dropping the port number. (e.g. http://localhost/myVideo.flv). Is there somethi...

Examining AJAX HTTP requests using Web Inspector

Is there an easy way to examine the HTTP GET/POST/OPTIONS/HEAD etc requests being made by jquery ajax calls using WebKit's Web Inspector? I'm hand crafting responses and am looking for a simple way to monitor the back and forth traffic. ...

C++ HTTP / HTML Socket Question

I'm building an application which I'd like to have it connect to a website and parse some data off it. I'm wondering if anyone could provide me some raw example code. I don't necessarily need help parsing, I'm just wondering in C++ how would I go about downloading the data from the page into my app so that I can start parsing the data I...

Is there a .NET ready made method to process response body of a HttpListener HttpListenerRequest body?

I'm using HttpListener to provide a web server to an application written in another technology on localhost. The application is using a simple form submission (application/x-www-form-urlencoded) to make its requests to my software. I want to know if there is already a parser written to convert the body of the html request document into...

Why am I getting this error in python ? (httplib)

if theurl.startswith("http://"): theurl = theurl[7:] head = theurl[:theurl.find('/')] tail = theurl[theurl.find('/'):] response_code = 0 import httplib conn = httplib.HTTPConnection(head) conn.request("HEAD",tail) res = conn.getresponse() response_code = int(res.status) http://www.garageband.com/mp3cat/.UZCKbS6N4qk/01_Saraenglis...

How to display the Authentication Challenge in UIWebView?

I am trying to access a secure website through UIWebView. When I access it through safari, i get an authentication challenge but the same does not appear in my UIWebView in the application. How can I make it appear? Any pointers, sample code or links will be very helpful. Thanks a lot. ...

Rails - RESTful Routing - Add a POST for Member i.e(tips/6)

Hello there, I'm trying to create some nice RESTful structure for my app in rails but now I'm stuck on a conception that unfortunately I'm not sure if its correct, but if someone could help me on this it would be very well appreciated. If noticed that for RESTful routes we have (the uncommented ones) collection :index => 'GET' ...

Rewriting with lighttpd - how to remove file extensions

I would like to use lighttpd's mod_rewrite to allow requests without a specific file extension. For instance, I would like the following mappings to automatically work: Requesting for "/index" would serve "/index.php". "/dir/file" => "/dir/file.php" "/dir/file?args" => /dir/file.php?args" Can this be easily done with a single rewrite...

download a zip file to a local drive and extract all files to a destination folder using python 2.5

hi, I am trying to download a zip file to a local drive and extract all files to a destination folder. so i have come up with solution but it is only to "download" a file from a directory to another directory but it doesn't work for downloading files. for the extraction, I am able to get it to work in 2.6 but not for 2.5. so any sugges...

which scenario in http transaction is occurred ?

In http transaction for request and response which scenario is occurred ? client (web browser) open connection and send it's request and connection open (keep alive) until server accept and answer then close connection ? client (web browser) open connection and send it's request then connection is closed and server accept and answer a...