What's the most reliable, generic way to construct a self-referential URL? In other words, I want to generate the http://www.site.com[:port] portion of the URL that the user's browser is hitting. I'm using PHP running under Apache.
A few complications:
Relying on $_SERVER["HTTP_HOST"] is dangerous, because that seems to come straight ...
i mean the
HTTP/1.1 xxx yyyyyyy
header
i can modify all others with mod_headers
but want to be able to return a status 200 for 403 error pages to a particular user-agent that dosn't display the text of my 403 pages {it displays an alternate page}
just asking if anyone knows an env-var or header name i can alter in apache.conf to alter...
The following line gives an error (cannot convert type "string" to "System.Guid")
userId = Request.QueryString["id"];
is there any solution to pass Guid variable in http header Get?
...
Where can I find reference code that implements a HTTP Basic Authentication client in pure Javascript, suitable for Ajax?
(Yes, I could read the spec and implement it myself, but it's for a side project and I'd rather not spend much time on it.)
Extra points for code, or pointers to code, that can be used independent of JS toolkits lik...
I work for a large-ish advertising company. We've created a very lightweight clone of the PayPal IPN so we can offer CC Processing services for our top advertisers.
Like the PP IPN, it's a simple RESTful interface.
I deliberately instructed our admin guys to configure the vhost for this web app to only respond to requests on port 443...
I need to upload potentially big (as in, 10's to 100's of megabytes) files from a desktop application to a server. The server code is written in PHP, the desktop application in C++/MFC. I want to be able to resume file uploads when the upload fails halfway through because this software will be used over unreliable connections. What are m...
I have a situation where we're aggregating what amounts to marketing data from N number of clients, where a client can host a HTML form using any backend of their choice, each with the action of the form pointing to a path that we're hosting. Each client has a different URL, there's no auth (but there is some simple validation of the da...
Quite often one has to encode an big (e.g. 128 or 160 bits) number in an url. For example many web applications use md5(random()) for UUIDs.
If you need to put that value in an URL the common approach is to just encode it as an hexadecimal string.
But obviously hex encoding is not a very tight encoding. What other approaches are there...
Are URIs (specifically HTTP URLs) allowed to have a space in them? If they must be encoded, is '+' just a commonly followed convention, or a legitimate alternative? Thanks!
EDIT: Can someone point to an RFC indicating that a URL with a space must be encoded?
joe
...
I've been writing a fair number of smaller wsgi apps lately and am looking to find a web server that can be distributed, preconfigured to run the specific app. I know there are things like twisted and cherrypy which can serve up wsgi apps, but they seem to be missing a key piece of functionality for me, which is the ability to "pseudost...
Are all URL's encrypted when using SSL(https) encryption? I would like to know because I want all URL data to be hidden when using SSL(https).
If SSL gives you total URL encryption then I don't have to worry about hiding confidential information form URLs.
...
If I was to send a URL to a DNS server, lets say: "dev.example.com/?username=daniel",
what is exactly sent to the DNS server? The whole URL (including any passed parameters) or is it just website section "dev.example.com"? I want to know so that I know what parameters I should be hiding in a URL.
The reason I am asking is because I jus...
I have a cocoa class set up that I want to use to connect to a RESTful web service I'm building. I have decided to use HTTP Basic Authentication on my PHP backend like so…
<?php
if (!isset($_SERVER['PHP_AUTH_USER'])) {
header('WWW-Authenticate: Basic realm="My Realm"');
header('HTTP/1.0 401 Unauthorized');
//Stuff that users...
I think the title is my question. I would like to know what's the difference when using GET or POST method in php. Which one is more secure? What are dis/advantages of each of them?
Thanks
EDIT: I also found similar question to this one here.
...
Whats the use of HTTP GET method if POST can handle many of the issues of GET?
...
We currently have a Java applet that generates a lot of data and uploads it to our servers. One of the upload methods we have is to use an HTTP POST to our server, the contents of which are just the raw data (no multipart encoding or anything).
I'm looking at implementing a Flex app that does the same thing, but I don't see a way to du...
I have a python client which pushes a great deal of data through the standard library's httlib. Users are complainging that the application is slow. I suspect that this may be partly due to the HTTP client I am using.
Could I improve performance by replacing httplib with something else?
I've seen that twisted offers a HTTP client. It ...
If you are connected to the Internet directly (and not through a proxy) and requests for a page (get/post) in Internet Explorer 7, the default time-out is 1 minute. If the response from the web server takes more than a minute then you end up getting a "Network error" from IE.
How can I increase this timeout in IE?
Microsoft has docume...
Hello,
which is the maximum length of an URL? does it depend on the browser? its max length is specified by a RFC?
Thanks.
Duplicate of What is the maximum length of an url?
...
I've got a caching problem with the Internet Explorer 6.0 and I want to instruct the browser not to cache the page he's requesting.
Further information: In my page, there's a random token that prevents reloading the site and posting the same information twice or more.
If you now bookmark this page, the browser has to be instructed to r...