http

Sharepoint web part POST

It's easy to create a hyperlink that passes parameters using GET by adding them to the URL: http:\somesite.com?name=fred but the web service I'm connecting to uses POST. What's the best way to do this in Sharepoint? ...

write HTTP Proxy in Java

How would I go about creating an HTTP Proxy in Java for use recording and playing back HTTP Sessions? This would be for entirely legitimate performance monitoring purposes. Are there any classes in the standard JDK or does anyone know of any examples that are available? Thanks. ...

Is it possible to use http get and http post in NSIS?

Hi all, I have a local updater that is able to download a mini installer from the web server using the NSISdl plugin. Let's say I have a bunch of mini installer versions. Is there also a way for the local installer to check for the "LATEST" mini installer available from the web server . I've heard you can do that through a web servic...

How to download a file using python in a 'smarter' way?

I need to download several files via http in Python. The most obvious way to do it is just using urllib2: import urllib2 u = urllib2.urlopen('http://server.com/file.html') localFile = open('file.html', 'w') localFile.write(u.read()) localFile.close() But I'll have to deal with the URLs that are nasty in some way, say like this: http:...

How to set Content-Encoding with gzip

I am compressing html files with gzip. The browser (FF 3.0.10) does not decompress or display index.html.gz (pre-compressed on the server) when I request index.html Where can I confirm the zipped header "content-encoding" and the browsers "Accept-Encoding"? (I am using the zlib API in C for zipping) Thanks. ...

Add Expires or Cache Control Header to static content in IIS

After running the YSlow plugin on a site, I saw that one of the recommendations was to add far future expires headers to the scripts, stylesheets, and images. I would like to do this, does anyone have experience with this? I am using IIS 7 and I read an article from Microsoft but am not interested in disabling caching for asp pages o...

How do different browsers handle caching for static content without an Expires Header?

After running the YSlow plugin on a site, I saw that one of the recommendations was to add far future expires headers to the scripts, stylesheets, and images. I asked a different question about how to set this up in IIS, but I am actually just curious about how each browser behaves. I have read that IE will cache items per browsing s...

How can I programmatically remove the 2 connection limit in WebClient

Those "fine" RFCs mandate from every RFC-client that they beware of not using more than 2 connections per host... Microsoft implemented this in WebClient. I know that it can be turned off with App.config: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.net> <connectionManagement> <add address="*" maxconnecti...

Why both no-cache and no-store should be used in HTTP response?

I'm told to prevent user-info leaking, only "no-cache" in response is not enough. "no-store" is also necessary. Cache-Control: no-cache, no-store After reading this spec http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html, I'm still not quite sure why. My current understanding is that it is just for intermediate cache server. Even...

Internet Explorer ignoring my cookies

Hi I am having a strange problem with Internet Explorer not accepting my cookies. This is the cookie: set-cookie: USUSERNAME=LrceSVu6mUJ9Ztmvp4oKSQ%3D%3D; version="1"; expires=Mon, 15-Jun-2009 11:42:21 GMT; path=/; domain=.us.is It does not get stored for the domain dev-intranet.us.is or any other us.is domain. However setting the do...

What byte[] concludes a HTTP server response?

what byte/bytes do you send to conclude a HTTP server response? ...

PHP Difference between Curl and HttpRequest

I have a need to do RAW POST (PUT a $var) requests to a server, and accept the results from that page as a string. Also need to add custom HTTP header information (like x-example-info: 2342342) I have two ways of doing it Curl (http://us.php.net/manual/en/book.curl.php) PHP HTTP using the HTTPRequest (http://us.php.net/manual/en/book...

HTTP status code 0 - what does this mean in MS XMLHTTP?

I have an HTA (microsoft html application - just an offline html + javascript app) that is using the standard MS XMLHTTP COM object (Microsoft.XMLHTTP or Msxml2.XMLHTTP depending on version detected) via JavaScript to send some data back to the server. It is returning status code 0. This is apparently not a valid HTTP status code (they...

How do I make it difficult for users to save mp3 files from my site to their hard drives?

I want users to be able to upload mp3s and also be able to play them through a player embedded on a page. I know it's impossible to stop dedicated users from copying the audio by directly recording it from the computers output but I want to make it difficult or impossible for a user to just copy a URL and paste it which will allow them d...

Giving C++ Application a HTTP Web Server Functionality

I have a C++ app and looking for a library that would make it a HTTP Server that's able to serve static files as well as perform very simple tasks. The only constraint is that it must be Cross-platform. What are my options. Clarify: I need a web interface for my application. This application is a background program that does other ta...

C++ - Simple server which sends simple HTML to clients

Now, I'm just fooling around with this and I'm not sure as to why this isn't working. #include <winsock2.h> #include <ws2tcpip.h> #include <iostream> #include <cassert> const char html[] = "HTTP/1.1 200 OK\r\n" "Connection: close\r\n" "Content-type: text/html\r\n" "\r\n" "<html>\r\n" "<head>\r\n" "<title>Hello, world!</title>\r\n" "</h...

Android project using httpclient --> http.client (apache), post/get method

Hi all, I'm doing a Get and Post method for an android project and I need to "translate" HttpClient 3.x to HttpClient 4.x (using by android). My problem is that I'm not sure of what I have done and I don't find the "translation" of some methods... This is the HttpClient 3.x I have done and (-->) the HttpClient 4.x "translation" if I hav...

Can I do my own HTTP header attribute?

Hi, can I make my own headers in HTTP request? e.g. This is normal HTTP request GET / HTTP/1.1 Host: google.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT x.x; xx; rv:x.x.x.x) xxx Firefox/3.0.10 (.NET CLR 3.5.30729) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: xx,en-us;q=0.7,en;q...

HTTP 'Get' Security

...

When serving JavaScript files, is it better to use the application/javascript or application/x-javascript

The whole question fits in the title. And to add some context: I'm not asking what is the best according to what the specs are saying, but rather what works the best given the mix of browsers deployed nowadays. Some data points: Google uses text/javascript for the JS used on their home page. Google uses text/javascript on Google Docs....