http

Detect that asp.net http headers already sent

I am adding headers to a page as follows: Page.Response.AddHeader("foo", "bar"); Depending upon previous processing, sometimes this fails with "Server cannot append header after HTTP headers have been sent." I am dealing with this by enclosing Page.Response.AddHeader("foo", "bar"); within a try-catch construct. However, to keep things...

SVN - http checkout issue

Dear Experts, I have corrected my httpd config file after that I could able succeed the LDAP authentication Now I am trying to checkout the files using the following code SvnClient client = new SvnClient(); SvnCheckOutArgs coArgs = new SvnCheckOutArgs(); bool isCheckedOut = client.CheckOut("http://100.21.45.12:8999/SVN/myrepo/SDT", wo...

Plain HTTP along with WCF - how?

hey there! The brand-new WCF-based code needs (in the meanwhile) to provide a service to a legacy code that works in plain HTTP. So that, along with new SOAPed requests, I need to tailor some oldskul-style communication (on a different port): to be able to receive plain HTTP, analyse the request body and send the plain HTTP with some bo...

Multiple authentication schemes for HTTP 'Authorization' Header

For our api user we need two styles of authentication: authenticate the api-user (mobile-device, partner integration) authenticate a specific "normal" user, which owns data on our side The standard challenge vs. response is handled through WWW-Authenticate and Authorization Headers. I want to reuse this. I have following use-case: O...

permanent 301 redirect in Tomcat 5.5

Is it possible to do 301 redirect with Tomcat 5.5 running standalone, not behind IIS/Apache? ...

Retry-after HTTP response header - does it affect anything?

If I want to politely refuse service on a web site due to temporary overload, the HTTP response 503 Service Unavailable seems appropriate. The spec mentions sending a Retry-after header with the 503. Is there any point? Does Retry-after affect anything? Do browsers pay any attention to it? ...

How to do a post request for my reCaptcha ajax api?

My reCaptcha is now implemented into my signup process using ajax.. Currently no matter what is typed in the captcha text field it never validates. It just keeps giving me new words to type in. I've figured it's because I need to test if the user entered the right captcha answer. I need to send a POST request. I have no idea how to do...

actionscript: can I get the http request URL?

a.swf is loaded in a.html which is hosted at http://www.a.com/a.html. I want to know, if user browses http://www.a.com/a.html, in actionscript, can I get the http request URL? In this example I want http://www.a.com/a.html. ...

Howto: Javascript files always up-to-date

I have a .NET web applications which uses a lot of javascript. The .aspx and the .js files go hand-in-hand together. Problem: The .aspx files are always up-to-date on the client (not cached) but the .js files might well be cached. This is even a problem if the files are only cached for one session since users are spending many hours on ...

Testing HTTP Hooks

Hello stackers, I am building an API, one of its feature is the use of HTTP POST Hook calls triggered on particular actions. Without taking the time to set a locale route to be the target of the POST call I was looking for an online service showing live POST to a given URL or some other way of testing POST hooks in my code. Any advice...

HTTP file upload: Can I rely on the browser always sending a file name?

According to this great article about HTTP uploads by Scott Hanselman, the browser typically sends a file name with the file's contents. Can I rely on the file name always being transmitted or do I have to give the user the option to enter a name if none was submitted? (If a name was submitted I do not want to prompt him for a specific r...

Simulating calls made by Silverlight to the server

I am trying to make an automated test/load test on a Silverlight based webapp. AFAIK, Silverlight uses WCF to make web service calls to the server. Instead of trying to make those web service calls, currently I am considering capturing all http traffic between the browser and the server (using a proxy) and replaying that using a script (...

When did it become OK to use UTF-8?

When did people start using UTF-8 in files encoding and HTTP Content-Type headers? Since all web servers, OSes, text editors and browsers support it today, when did it become "compatible" between these? ...

org.apache.axis2.AxisFault: Transport error: 501 Error: Not Implemented

I am trying to call an Axis2 web service using a code like: stub = new MyServiceStub("http://server/app/services/MyService"); stub.ping(); Stubs/skeletons are generated with codegen. I can interact correctly with the web service from other clients (even something low level written with SAAJ) but not from a stupid stub call. I am gett...

Improving upload speed by sending chunk of bytes

I'm developing an android video uploading app and uploading large amounts of video is a problem, I get different type of exception sometimes (host not resolved, pipe broken), I do a multipart POST but I have a feeling if I upload chunk of bytes one at at time that'll increase upload speed as well as solve connection timeout and these typ...

How to enable timeout per each restful web service method

How would one go about setting timeouts for each REST API method on the server side. For example I have certain web service methods that upload images and I want to increase the timeouts for these methods compared to ones that have lower http payloads. Architecture I am dealing with: haproxy, nginx, tomcat ...

F# web server library

Is there a web server library for F#, similar to SimpleHTTPServer in Python? Installing a full server like IIS is overkill for what I want, which is a simple application that can be queried using a web browser, effectively using HTTP as a monitoring method. Ideally, a request to the address /engines/id/state would map to a function get_...

gtm-http-fetcher modify HTTP Headers

Hey Everyone, I didn't know if anyone here has had experience with the gtm-http-fetcher provided by google. I am specifically looking to modify the HTTP headers in a request. Any help or examples would be appreciated. -Pat ...

Making HTTP post request (with an input type="file") from within Maven, using command line parameters if possible

Dear All: I would like to convert this bash script: #!/bin/bash if ! [ $# == 2 ]; then echo Usage: update-module admin-password module-file exit 1 fi if ! [ -f $2 ]; then echo Error: module file $2 does not exist exit 1 fi curl -c /tmp/cookie.txt -d uname=admin -d pw=${1} http://localhost:8080/openmrs/loginServlet curl -b /...

Java HTTP PUT with Digest authentication in Java

enter code hereHi, I am trying to upload a file with Java using PUT, server does Digest authentication. I want to keep it lean, so I try to use HttpURLConnection. public void putData(String path, byte [] data) throws IOException, MalformedURLException { Authenticator.setDefault(new Authenticator() { protected PasswordAuthenticat...