Some times Servers may receive POST request with an extra CRLF ,which mostly added by clients(browsers) . Because some servers (e.g CERN webserver) require this extra CRLF to process. As per the RFC this is not a valid request , for this reason only ,content length header in the POST request will not include this CRLF.
generic-message = start-line
*(message-header CRLF)
CRLF
[ message-body ]
start-line = Request-Line | Status-Line
This is the BNF for the http requests. In this after each header there should be one CRLF to indicate the end of the header , and one extra CRLF should be between the headers and the body to differentiate message body with headers. In message-body there should not be any CRLF's.
Certain buggy HTTP/1.0 client implementations generate extra CRLF's after a POST request. To restate what is explicitly forbidden by the BNF, an HTTP/1.1 client MUST NOT preface or follow a request with an extra CRLF.
This blog is all about technical questions in C, C++, data structures like linked lists, Binary trees, UNIX and other software developement issues which I faced.
Wednesday, June 10, 2009
Tuesday, June 9, 2009
Printing whole string in GDB
In GDB generally to print the value of the variable ,we use print or just p .
But for the strings or arrays of large size , it wont print whole string or array.
we have to do some modifications.
By default GDB will print upto 200 characters ,if the string is very large.
To change this there is command in GDB
(gdb) set print element 20
(gdb)
next time it will print upto 20 characters
(gdb) set print element 50
(gdb)
next time it will print upto 20 characters
(gdb) set print element 0
(gdb)
next time it will print whole array or string
But for the strings or arrays of large size , it wont print whole string or array.
we have to do some modifications.
By default GDB will print upto 200 characters ,if the string is very large.
To change this there is command in GDB
set print elements number-of-elements
- Set a limit on how many elements of an array GDB will print. If GDB is printing a large array, it stops printing after it has printed the number of elements set by the
set print elements
command. This limit also applies to the display of strings. Setting number-of-elements to zero means that the printing is unlimited.
(gdb) set print element 20
(gdb)
next time it will print upto 20 characters
(gdb) set print element 50
(gdb)
next time it will print upto 20 characters
(gdb) set print element 0
(gdb)
next time it will print whole array or string
Subscribe to:
Posts (Atom)
Popular Posts
-
A universally unique identifier ( UUID ) is an identifier standard used in software construction, standardized by the Open...
-
Recently I started working on Japser Studio professional for my new project Cloud to generate the reports. I was very new to all cloud ...
-
strcmp is another string library function which is used to compare two strings and returns zero if both strings are same , returns +ve valu...
-
Below is C program for AVL Tree implementation. #include<stdio.h> #include<malloc.h> typedef struct bst { int info; int hei...
-
One of the complex operation on binary search tree is deleting a node. Insertion is easy by calling recursive insertion. But deletion wont...
-
We have recently faced one tricky issue in AWS cloud while loading S3 file into Redshift using python. It took almost whole day to inde...
-
Object slicing: when a derived class object is assigned to a base class object. only base class data will be copied from derived class and...
-
We have faced lot of weird issues while loading S3 bucke t files into redshift. I will try to explain all issues what we faced. Before go...
-
Recently we faced one issue in reading messages from SQS in AWS cloud where we are processing same message multiple times. This issue we...
-
Below code is to find the cube root of a given integer number with out using pow math library function. Its very simple and brute force...