20090409

Hypertext Transfer Protocol -- HTTP/1.൧ RFC 2616 Fielding, et al. ര്‍ത്ഫം ര്ട്ര്ഫ്ക് വുല്ലത് 10 Status Code ടെഫിനിറേന്‍സ്(abridged ;)

RFC 2616 Hypertext Transfer Protocol HTTP/1.1
10 Status Code Definitions

10.1 Informational 1xx
10.1.1 100 Continue
10.1.2 101 Switching Protocols
10.2 Successful 2xx
10.2.1 200 OK
10.2.2 201 Created
10.2.3 202 Accepted
10.2.4 203 Non-Authoritative Information
10.2.5 204 No Content
10.2.6 205 Reset Content
10.2.7 206 Partial Content
10.3 Redirection 3xx
10.3.1 300 Multiple Choices
10.3.2 301 Moved Permanently
10.3.3 302 Found
10.3.4 303 See Other
10.3.5 304 Not Modified
10.3.6 305 Use Proxy
10.3.7 306 (Unused)
10.3.8 307 Temporary Redirect
10.4 Client Error 4xx
10.4.1 400 Bad Request
10.4.2 401 Unauthorized
10.4.3 402 Payment Required ( This code is reserved for future use. )
10.4.4 403 Forbidden
10.4.5 404 Not Found
10.4.6 405 Method Not Allowed
10.4.7 406 Not Acceptable
10.4.8 407 Proxy Authentication Required
10.4.9 408 Request Timeout
10.4.10 409 Conflict
10.4.11 410 Gone
10.4.12 411 Length Required
10.4.13 412 Precondition Failed
10.4.14 413 Request Entity Too Large
10.4.15 414 Request-URI Too Long
10.4.16 415 Unsupported Media Type
10.4.17 416 Requested Range Not Satisfiable
10.4.18 417 Expectation Failed
10.5 Server Error 5xx
10.5.1 500 Internal Server Error
10.5.2 501 Not Implemented
10.5.3 502 Bad Gateway
10.5.4 503 Service Unavailable
10.5.5 504 Gateway Timeout
10.5.6 505 HTTP Version Not Supported



3.1 HTTP Version
HTTP-Version = "HTTP" "/" 1*DIGIT "." 1*DIGIT
Note that the major and minor numbers MUST be treated as separate integers and that each MAY be incremented higher than a single digit. Thus, HTTP/2.4 < HTTP/2.13 < HTTP/12.3. Leading zeros MUST be ignored by recipients and MUST NOT be sent.
Applications SHOULD use an HTTP-Version of "HTTP/1.1" in their messages, and MUST do so for any message that is not compatible with HTTP/1.0. (when to send HTTP-Version: see RFC 2145 [36].)

3.2 Uniform Resource Identifiers
WWW addresses, Universal Document Identifiers, Universal Resource Identifiers, Uniform Resource Locators (URL) and Names (URN).

3.2.1 General Syntax
URIs in HTTP can be represented in absolute form or relative to some known base URI. Absolute URIs always begin with a scheme name followed by a colon. (see RFC 2396 "(URI): Generic Syntax and Semantics." This specification adopts the definitions of "URI-reference", "absoluteURI", "relativeURI", "port", "host","abs_path", "rel_path", and "authority" from that specification.

Servers MUST be able to handle the URI of any resource they serve, and SHOULD be able to handle URIs of unbounded length if they provide GET-based forms that could generate such URIs. A server SHOULD return 414 (Request-URI Too Long) status if a URI is longer than the server can handle (see section 10.4.15).
Note: Servers ought to be cautious about depending on URI lengths
above 255 bytes, because some older client or proxy
implementations might not properly support these lengths.

3.2.2 http URL
The "http" scheme is used to locate network resources via the HTTP protocol. This section defines the scheme-specific syntax and semantics for http URLs.

http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]

If the port is empty or not given, port 80 is assumed. The use of IP addresses in URLs SHOULD be avoided whenever possible (see RFC 1900). If a proxy receives a host name which is not a fully qualified domain name, it MAY add its domain to the host name it received. If a proxy receives a fully qualified domain name, the proxy MUST NOT change the host name.

3.2.3 URI Comparison
When comparing two URIs to decide if they match or not, a client SHOULD use a case-sensitive octet-by-octet comparison of the entire URIs, with these exceptions:
- A port that is empty or not given is equivalent to the default
port for that URI-reference;
- Comparisons of host names MUST be case-insensitive;
- Comparisons of scheme names MUST be case-insensitive;
- An empty abs_path is equivalent to an abs_path of "/".
Characters other than those in the "reserved" and "unsafe" sets (see RFC 2396) are equivalent to their ""%" HEX HEX" encoding.
http://abc.com:80/~smith/home.html == http://ABC.com/%7Esmith/home.html == http://ABC.com:/%7esmith/home.html

3.3 Date/Time Formats
Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123
All HTTP date/time stamps MUST be represented in Greenwich Mean Time (GMT), without exception.

3.3.2 Delta Seconds
Some HTTP header fields allow a time value to be specified as an integer number of seconds, represented in decimal, after the time that the message was received.
delta-seconds = 1*DIGIT

3.4 Character Sets
HTTP uses the same definition of the term "character set" as that described for MIME:

















10.3.3 302 Found
The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client SHOULD continue to use the Request-URI for future requests. This response is only cacheable if indicated by a Cache-Control or Expires header field.

The temporary URI SHOULD be given by the Location field in the response. Unless the request method was HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI(s).

If the 302 status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.

Note: RFC 1945 and RFC 2068 specify that the client is not allowed
to change the method on the redirected request. However, most
existing user agent implementations treat 302 as if it were a 303
response, performing a GET on the Location field-value regardless
of the original request method. The status codes 303 and 307 have
been added for servers that wish to make unambiguously clear which
kind of reaction is expected of the client.


















--
map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}
unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"

20090408

ലെക്കെര്‍ വിജ്ഫ് അന്ടെര്സ് ;)klekker wijf anders ;)

rbawaskar at gmail dot com
08-Mar-2009 06:17
Found this script after much despair, should be useful to lot of people.
To submit a form using POST method through PHP, just add the data to be posted as header. This essentially saves one extra html page sent to the browser when user has to be redirected. Mostly found this technique useful for redirecting to payment gateways.

$host = "www.example.com";
$path = "/path/to/script.php";
$data = "data1=value1&data2=value2";
$data = urlencode($data);

header("POST $path HTTP/1.1\r\n" );
header("Host: $host\r\n" );
header("Content-type: application/x-www-form-urlencoded\r\n" );
header("Content-length: " . strlen($data) . "\r\n" );
header("Connection: close\r\n\r\n" );
header($data);
?>

--
map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}
unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"

#!/bin/sh
#remove the line below the config (marked remove) after editing to make it work ;)

#set -o xtrace
CURDIR="$(pwd)"
FROMDIR="/Users/drkrimson/Work/inhouse/tantekaat"
TODIR="/Users/drkrimson/Sites/kaat.tys/"
SVNLOC="file:///Users/drkrimson/Documents/SVNRoot/trunk/inhouse/tantekaat/WebRoot"
TONEWDIR="public_html"
COMMITMSG="exporting ${FROMDIR} to ${TODIR} on ${TODAY}"

# remove
exit

cd "$FROMDIR"
svn add *{,/*{,/*{,/*{,/*}}}} 2>/dev/null
CMTEST="$(svn commit -m "${COMMITMSG}" | grep -i revision 2>&1)"
if [[ -n "$CMTEST" ]]; then
echo "$CMTEST"
cd "$TODIR"
rm -rf "${TONEWDIR}_previous"
mv -f "$TONEWDIR" "${TONEWDIR}_previous"
SVNE=$(svn export --force "${SVNLOC}" "${TONEWDIR}" | grep -i revision 2>&1)
echo "$SVNE"
else
echo "Couldn't commit!"
echo "$CMTEST"
fi
if [[ -f ${CURDIR}${0}.after.sh ]]; then
${CURDIR}${0}.after.sh
fi
cd $CURDIR

--
map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}
unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"

20090407

mssql kinky inner join

USE AdventureWorks;
GO
SELECT DISTINCT p.ProductID, p.Name, p.ListPrice, sd.UnitPrice AS 'Selling Price'
FROM Sales.SalesOrderDetail AS sd
JOIN Production.Product AS p
ON sd.ProductID = p.ProductID AND sd.UnitPrice < p.ListPrice
WHERE p.ProductID = 718;
GO
--
map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}
unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"

toplinks

<a href="http://www2.odysseus.be/agent/ae/home" class="mainlevel" style="color: rgb(255, 255, 255); text-decoration: underline; font-family: tahoma, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: normal; font-variant: small-caps; letter-spacing: 0px; padding-left: 5px; ">Home</a><span class="mainlevel">&nbsp;|&nbsp;</span><a href="http://www2.odysseus.be/agent/ae/odysseusvacations/" class="mainlevel" id="active_menu" style="color: rgb(177, 187, 199); text-decoration: none; font-family: tahoma, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: normal; font-variant: small-caps; letter-spacing: 0px; padding-left: 5px; ">Odysseus Vacations</a><span class="mainlevel">&nbsp;|&nbsp;</span><a href="http://www.parfums-travel.be/index.asp?lang=en" target="_blank" class="mainlevel" style="color: rgb(177, 187, 199); text-decoration: none; font-family: tahoma, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: normal; font-variant: small-caps; letter-spacing: 0px; padding-left: 5px; ">Parfums travel</a><span class="mainlevel">&nbsp;|&nbsp;</span><a href="http://www2.odysseus.be/agent/ae/downloads" class="mainlevel" style="color: rgb(177, 187, 199); text-decoration: none; font-family: tahoma, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: normal; font-variant: small-caps; letter-spacing: 0px; padding-left: 5px; ">Downloads</a><span class="mainlevel">&nbsp;|&nbsp;</span><a href="http://www2.odysseus.be/agent/ae/aboutody" class="mainlevel" style="color: rgb(177, 187, 199); text-decoration: none; font-family: tahoma, Arial, Helvetica, sans-serif; font-size: 11px; font-weight: normal; font-variant: small-caps; letter-spacing: 0px; padding-left: 5px; ">About Odysseus</a><br class="khtml-block-placeholder">

പ്രോടോടിപേ ബഗ്

jrochkind
September 5th, 2008 @ 08:36 PM
Okay, I have a patch that seems to work. I don't entirely understand what I'm doing, so use with caution. And sorry I don't have a clean prototype to actually make a real patch (or know how to, for that matter).

But in Prototype 1.6.0.2, there is a wrapper for viewportOffset for IE, that has a bug in it.

Look for the line:

var offsetParent = element.getOffsetParent();

Change to:

var offsetParent = (element.parent) ? element.getOffsetParent() : 0;

Seems to do the trick for me.

Seems like it's actually a prototype bug, not a scriptaculous one? But not really sure.

--
map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}
unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"