I've set both Timeout and ReadWriteTimeout of HttpWebRequest, and still GetRequestStream does not time out when trying to connect to a non-existent server. I've run into similar problems in the past when the DNS resolution was struck, but this time the server in question is running on my own machine (localhost) so this not relevant.
The...
Is there any way of instructing a web browser to completely delete one's cookie set with PHP?
I do not want to expiry it or wait for the browser to be closed.
With delete I mean to actually not have it listed inside the cookie's list anymore.
...
I have an image <image src="blah.com/image.gif"/>. when the image loads, is there a way to change the http referer to X so that the src host sees the http referer of the image request coming from X?
...
For my development environment I recently moved to PHP 5.3 w/ fastCGI on IIS from php 5.2 w/ ISAPI on IIS and when I have an error (such as function name is incorrect) I'm used to PHP reporting back FATAL ERROR etc... to the browser. Intermittently instead of receiving the error I receive a HTTP 500. If browsing with firefox this does ...
I'm looking to build an intelligent reverse http proxy capable of routing, header examination and enrichment (eg. examine and build cookies and http headers), and various other fanciness. For a general idea of what I'm looking to build see Ruby Proxies for Scale and Monitoring - except in Python.
I realize that Twisted is an exceedingl...
Hi
I cant find a way to use an url that requires basic auth when im useing mp.setDataSource(url);
MediaPlayer mp = new MediaPlayer();
mp.setDataSource(url);
mp.prepareAsync();
Anyone that got any ideas?
...
Friends and fellow users,
We have both 402 and 403 http response codes. Though, 402 is reserved for future use.
What is (or would be) the difference between these two. Payment not received should be equal to not authorized, shouldn't it?
EDIT:I would like to know the answers on a "Why 402 is required when we already have 403" angle.
...
I am trying to write a proxy which reads an image from one server and returns it to the HttpContext supplied, but I am just getting character stream back.
I am trying the following:
WebRequest req = WebRequest.Create(image);
WebResponse resp = req.GetResponse();
Stream stream = resp.GetResponseStream();
StreamReader sr = new StreamRead...
I need the sniffer to test network traffic of applications developed by me for Windows and Facebook.
Basic requirements:
-display request and response
-display HTTP headers
-display the time it took to complete HTTP request
Now I'm using HTTP Analyzer.
A very good tool, but it terminates with some error after 10-15 min running on Vista....
I am currently creating a set of custom media types for a RESTful api (e.g. application/vnd.mycompany.foo+xml) and I'm trying to identify the pros and cons of two different ways of exposing hypermedia links.
If I first consider what other media types do probably the best place to start is HTML. Html allows me to create links such as:
...
I am trying to do an HTTP POST to create an instance of a model in my Ruby on Rails app from my Cocoa app. I am writing both the client (Cocoa) and server (Rails) so I can make changes in either location.
I am running into a problem with the authentication token that is required when using Protect From Forgery
All is fine when I can...
I'm working on a Flex 3 application that uses the Flex IFrame project to connect to remote web servers, using basic authentication.
When authenticating against the remote web server, the URLRequest is put together with the following code, and loaded with a URLLoader.
var request:URLRequest = new URLRequest(targetHost);
var authorizat...
Hi,
I'm developing a wrapper around an existent RESTful API. I basically have to do some preprocessing, calling the underlying API, and some preprocessing, with a little bit of cache in the middle. The API is specially designed for RESTful access via http.
My question is, should I refactor the API so I can invoke it via code, or should...
I'm trying to interface with the Google Reader (undocumented/unofficial) API using information from this page. My first step is to get a SID and token, which works fine, but I can't seem to POST anything without getting a 401 error.
Here is the code I'm using to get my SID and token:
static string getSid()
{
HttpWebRequest...
I have a site with a form which must be served over HTTPS. There is a smaller form which is served on most other pages which acts as a teaser to draw visitors to the main form.
When the small form is submitted, in the OnClick of the button, I'm storing the values from the small form in the session, then Response.Redirect the user to the...
Here's some code:
Client client = new Client(Protocol.HTTP);
client.setConnectTimeout(1); //milliseconds
Response response = client.post(url, paramRepresentation);
System.out.println("timed out");
What I would expect to happen is that it prints "timed out" before the resource has time to process. Instead, nothing happens with the tim...
Hi,
I'm trying to read a file that I have a web address for into a byte array. I've been using File.ReadAllBytes to read files locally and I've been unable to figure out the cleanest way to do this for a file on the web.
I imagine this is just a quick snippet of code, but everything I can find through search is only for local files....
I’m using the following code to redirect the user if he/she logged in correctly (see comments in code). But I’m getting an error. What am I doing wrong?
<?php
require 'inc/header.php';
require 'inc/config.php';
require 'inc/functions.php';
?>
<?
$login = $_POST['login'];
if($login==1)
{
$username = mysql_escape_string(t...
I've created a HTTP Handler to prevent users from accessing unauthorized streaming ".flv" files.
It implements the IHttpHandler interface, is referenced in the Web.Config and works when I map an extension to ".pdf", but when I add the ".flv" the mapping in IIS, the app still seems ignored it (even though everything else is the same as i...
I have a class that inherits from httplib.HTTPSConnection.
class MyConnection(httplib.HTTPSConnection):
def __init__(self, *args, **kw):
httplib.HTTPSConnection.__init__(self,*args, **kw)
...
Is it possible to turn off the SSL layer when the class is instantiatied so I can also use it to communicate with non-secure servers?...