http

What is the quickest way to HTTP GET in Python?

What is the quickest way to HTTP GET in Python if I know the Content will be a string? I am searching the docs for a quick one-liner like: contents = url.get("http://example.com/foo/bar") But all I can find using Google are httplib and urllib - and I am unable to find a shortcut in those libraries. Does standard Python 2.5 have a sho...

SourceGuardian Error

Error printed to screen: Fatal error: SourceGuardian Loader - script checksum error [12] Encoded script was modified in /home/user/public_html/domain_com/includes_encoded/params.php on line 2 Facts: Using a Hostgator host which have SourceGuardian loaders already in place, phpinfo also confirms they are loaded. Using demo version...

How to prevent image hotlink from your ASP.NET site?

What is the best/simplest way to prevent people hotlinking to images from my hosted ASP.NET website? I don't need to prevent all images/resources from hotlinking, I just want to prevent hotlinking to specific images/resources on a site. FYI. It's hostesd on GoDaddy.com so IIS tricks probably wont work. ...

Discussion on 'didReceiveData' method for HTTP Connection

I created an indenpendent class for HTTP connection. All the connection works fine. The problem is that I find method 'didReceiveData' will be called AFTER the method who call the connection. (method 'didReceiveData' will be called after IBAction 'accept') - (IBAction)accept:(id)sender { [self connect:url]; //labelStr = ReturnS...

http load testing tool

I want to record web activity as would be done by a single user and then run one or multiple such simulteanous users (perhaps tweaking some params, such as converting user/password into user1/password, ..., usern/password). Playing with timing would be nice too. ...

How to redirect from HTTPS to HTTP without annoying error messages

I want to redirect users, after HTTPS login, to the HTTP pages on the site. Using HTTPS for the whole site is not going to happen. What I have so far is the following: User posts the login form to the secure site The secure server validates the credentials The secure server sends a 302 redirect to the client This works, except on ...

Why won't MFC::CHttpFile 'PUT' for me?

My code talks to a little Java application provided by a vendor. This Java app sets up a web server at localhost:57000 which is used to control the state of 'the machine'. For the purpose of this question, I need to change the state of 'the machine' from 'off' to 'on'. To make this happen I'm supposed to HTTP PUT the following string ...

Responding so the browser does not do anything - is it possible?

Is it possible to make such a HTTP response, that the browser ignores it and keeps showing the previously displayed page? I mean the following scenario: a) user clicks something b) some POST goes to the server (or GET, but let's stick with POST as more interesting) c) server decides that for some reason it does not want to send the r...

How big can a user agent string get?

If you were going to store a user agent in a database, how large would you accomdate for? I found this technet article which recommends keeping UA under 200. It doesn't look like this is defined in the HTTP specification at least not that I found. My UA is already 149 characters, and it seems like each version of .net will be adding to ...

When redirecting users from a legacy website to the new one, what is the best way to detect whether or not to show them a custom welcome message?

Say you have a legacy website running on an old code-base that offers certain functionality. The successor website is up and running, providing all the old functionality and more. For some time, there has been an HTML link on the old site pointing to the new one, for those users that care to click over. Now, the legacy site is reachin...

.NET HttpRequests using the Windows system Cache

I'm using either WebClient or HttpRequest/REsponse to make http calls for images. I'm not sure how caching specifically works for browsers, but is there a way to enable either WebClient or WebHttpRequest to use the systems "temporary internet files" cache that the browser utilize? Or, do I have to write my own disk cacher? ...

Reverse engineering windows mobile live search CellID location awareness protocol (yikes)...

I wasn't sure of how to form the question so I apologize if the title is misleading. Additionally, you may want to get some coffee and take a seat for this one ... It's long. Basically, I'm trying to reverse engineer the protocol used by the Windows Mobile Live Search application to get location based on cellID. Before I go on, I am a...

How to create a HTTP request listener Windows Service in .NET

I want to create Windows Service that acts as a HTTP listener and can handle around 500 clients. Are there any special considerations for this kind of service. I am a little confused between the HTTPListener class and the TCPListener class. Which one to use for a Windows Service that will: Accept the client connection (around 500) Pr...

How to access POST data in PHP?

Hello, I need to write PHP page which would accept XML document sent over POST request. Request itself looks like this: POST /mypage.php HTTP/1.1 Host: myhost.com Content-Type: application/xml Content-Length: ... <?xml version="1.0" encoding="utf-8"?> <data> ... </data> This is not data from some HTML form, just plain XML document....

Should I store _method=PUT/DELETE in the post or in the url

I'm using ASP.NET MVC to build a RESTful web application and I plan to tunnel PUT and DELETE requests through POST as it seems like the most pragmatic workaround. What I'd like to know is, should I tunnel the information through the url like this: <form method='post' action='resource?_method=DELETE'> <!-- fields --> </form> Or sh...

Firefox setting to enable cross domain ajax request

I need to temporally allow cross domain XMLHttpRequest. Changing firefox security setting seems to be the way to go. But I've tried with this and this but they didnt work. Has anyone been able to configure this before? Thanks. ...

how do you set a max-age for javascript/css?

I just ran Pagetest and it says I need to set a max-age for my JS/CSS. How do I do that? ...

NSURLConnection, NSURLRequest and remote caching

I'm having a small problem with request caching using NSURLConnection asynchronous connections on the iPhone. I don't know if I understood something incorrectly, or if Cocoa is doing the opposite to what it's supposed to do... The documentation for NSURLRequest says that: NSURLRequestReloadIgnoringLocalCacheData Specifies that ...

What exactly is RESTful programming?

What exactly is RESTful programming? Don't give me links to wikipedia please, I'm hoping for a straight-forward answer, not some BUZZ-word-ful answer. Bonus question: Should I feel stupid because I never heard about it outside SO? ...

How do you send anything beside GET and POST from browser to your RESTful app?

I am not gettng the RESTful thing. Yes, I know how to send a GET request to my app from my browser. It's through URL linking. <a href="/user/someone"> And can also send POST requests through form method. <form method="post"> Beside that I know browsers sometimes send HEAD command to figure out page status, but on which the end user...