http

Serializing and deserializing data - JavaScript

Hi folks, I need to perform a lot of serializing and de-serializing in an application. The data is POST parameters and Cookie headers. Post data example: Name=Jonathan+Doe&Age=23&Formula=a+%2B+b+%3D%3D+13%25%21 Set-Cookie data example: ASP.NET_SessionId=esur3bqqgrmnci45um4xegye; path=/ Does anyone have any fast librari...

How can I add an Array element into a Post rcp request

Hello community, I don't know how can I add array parameters in a post request. Until now I only needed something like method=method.name&param1=1.... My question is how can I add an Array in plain text? ...

How do I do this in my Django URLs? (.json, .xml)

Suppose this is my URL route: (r'^test/?$','hello.life.views.test'), How do I make it so that people can do .json, .xml, and it would pass a variable to my views.test, so that I know to make json or xml? ...

Making web server in C with native scripting support

I'm an intermediate C developer, trying to get better. I want to make a very basic and lightweight HTTP server with its own scripting language. Could I use something like Lua for scripting? If not, what? I don't want to use CGI/FastCGI like Apache does for PHP in most cases, I want my server to natively support my scripting language. ...

Radio buttons + array elements

I have a form that can be dynamically duplicated (with JS) so that the user can enter as much data as he wants. This works great for text inputs, because I just leave the name attribute the same (ending with a []) and then when the values are posted, it just returns me an array. Now I just realized that this doesn't work so well for radi...

how python http request and response works

I'm newbie for python, I'm having task so I need to scan wifi and send the data to the server, the below is the format which i have to send, this work fine when enter manually in browser url text box, http://223.56.124.58:8080/ppod-web/ProcessRawData?data={"userId":"2220081127-14","timestamp":"2010-04-12 10:54:24","wifi":{"ssid":"guest...

Post request with body_stream and parameters

Hello, I'm building some kind of proxy. When I call some url in a rack application, I forward that request to an other url. The request I forward is a POST with a file and some parameters. I want to add more parameters. But the file can be quite big. So I send it with Net::HTTP#body_stream instead of Net::HTTP#body. I get my request a...

Please suggest me some solutions for building a download service

I'm planning a web service providing file download service for handheld devices. The requirement I got is use HTTP or FTP Protocol to build a server, use database, store files and provide Command Line Interface for devices to download requested files. No platforms and languages limit. I'm a student and I'm learning Java Web(practicing...

Creating an http proxy

This might be a beginner question but I did some googling and couldn't find an answer so bear with me. I was wondering if there was a resource, tutorial, wiki, etc that explained how to create an http proxy. It would be good to see it in ruby but any language will do if that's not possible. Thanks a lot ...

Axis 1.4 Java: Modify HTTP response code

Hello, Is there a way to modify the HTTP response code when using apache axis 1.4 for java? This would be useful for testing purposes, for example simulating server side errors. I've already tried the following: Set the HTTP code directly in the http servlet Request: MessageContext context = MessageContext.getCurrentContext(); ...

301 Redirect & site alias

so I have a site I want to take offline. developmentsite.com and I want to redirect to a new site. So I do a 301 redirect. Redirect 301 / http://www.newssite.con. Now I want to continue working on developmentsite.com so I set it up as an alias on my own site mysite.developmentsite.com but because the .htaccess in the main httpdocs fol...

HttpHandler and XML files

Hello, I would like to intercept any request made to the server for XML files. I thought that it might be possible with an HttpHandler. It's coded and it works... on localhost only (?!?!). So, why is it working on localhost only? Here is my web.config <?xml version="1.0" encoding="utf-8"?> <configuration> <system.web> <httpHandle...

NSMutableURLRequest, http post, server response Missing parameter

I send HTTP post request to a server, but the server response is "Missing parameter: myHeader". myHeader is the header that i put. But everything is look ok in my part, so this is really weird. help will be great ...

What is the fastest way to send 100,000 HTTP requests in Python?

Hello, I am opening a file which has 100,000 url's. I need to send an http request to each url and print the status code. I am using Python 2.6, and so far looked at the many confusing ways Python implements threading/concurrency. I have even looked at the python concurrence library, but cannot figure out how to write this program corr...

What does the question mark at then end of a css include url do?

I've noticed that on some websites (including SO) the link to the CSS will look like: <link rel="stylesheet" href="http://sstatic.net/so/all.css?v=6638"&gt; I would say its safe to assume that ?v=6638 tells the browser to load version 6638 of the css file. But can I do this on my websites and can I include different versions of my CS...

SSL-enabled sites and links

Hi, I have a page on my site which was meant to be SSL enabled. Now, if the page has a link to an external site, does this invalidate my SSL encryption? Thanks ...

How to programmatically download image from website ?

I need to download images from a website, and I have the login name and password, but if i just use URL to download the image, it will throw a exception: there is no value in session. I think I need to login the website before I can programmatically download the image. Do you have any solutions ? Thanks in advance ! ...

Java: Infinite Error "null"

I am writing a simple web server in java as an exercise. When I run the program it immediately starts into an infinite loop outputting "Error: null" into the console. I have a few try/catch statements that do System.out.println("Error: " + e.getMessage()); I tried using the eclipse debugger to figure out where it starts, but when I ru...

Xcode iPhone Programming check if a server is online

My app has to connect to a server, but sometimes when I test my application I don't have my server online, so the app remains stuck when opening. How I can test programmatically if the server is online? Is there something like ping so i can verify the state of the server and then doing the normal work or not if it is offline? Thank you! ...

how to feed a file to telnet

hello community, trying to understand http and headers i was playing around with telnet to send requests. to not type everything again and again and again i thought i'd write a small textfile with all the commands i need. my file is as simple as follows: GET /somefile.php HTTP/1.1 Host: localhost i then try to feed it to telnet with...