Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
254 views

splitting a http response by \r\n\r\n using strtok

I am attempting to split this string: #define INVALID_NUMBER_PARAMS "HTTP/1.1 400 Bad Request\r\ncontent-type: text/html\r\ncontent-encoding: identity\r\ncontent-length: 59\r\n\r\nCould not ...
user18043747's user avatar
-4 votes
1 answer
593 views

i want to make http 1.1 200 response with C

I want to build a web server so that the client can view the index.html document in the local Linux environment using http 1.1. I don't know how to send proper html information to the client because I ...
amsd's user avatar
  • 1
3 votes
0 answers
292 views

no response from server in wireshark, but response received, and decompression failed error

This is my first proxy implementation, which send request from client to server, and send response from server to client. I actually have two questions. Q1: As shown in second line, request is ...
Mengge's user avatar
  • 121
1 vote
0 answers
406 views

Create HTTP GET in C return 301 redirect using IP address

I want to send a GET request to a page and retrieve it to use later to a crawler I have implemented my own D.N.S. resolver (like DIG command in LINUX) and I want to use the ip address to get the http ...
joesid's user avatar
  • 681
1 vote
0 answers
702 views

Read HTML Response using SSL_read() in C, HTTP/1.0

I read HTML response from a website using SSL_read() in C. I used HTTP/1.0 in request message. Here is my function: void Reveive_response(char *resp, SSL *ssl, int body_required) { char header[...
thanhdx's user avatar
  • 618
1 vote
0 answers
98 views

Get cookie from HTTPS response message in C - Terminal Ubuntu 16.04LTS

I have a problem when handling the HTTPS response message. I want to get cookie's content from Set-Cookie fields in response header I received. This is my function: void Get_cookie(char *ck, char *...
thanhdx's user avatar
  • 618
1 vote
1 answer
1k views

Receive http response messages using OpenSSL in C

I have some problems when trying to receive http response message of a website. This is my function: void Reveive_response(char *resp, SSL *ssl) { const int BUFFER_SIZE = 1024; char response[...
thanhdx's user avatar
  • 618
0 votes
1 answer
2k views

Error malloc(): memory corruption

I want to receive messages response from server so I wrote the function bellow: char * receive_response(SSL *ssl, BIO *outbio) { int bytes; int received = 0; char *resp; resp = (char *) ...
thanhdx's user avatar
  • 618
0 votes
1 answer
8k views

C# CR must be followed by LF

I write a very simple HTTP server by myself, and I use the C# Windows Form to retrieve the content of my HTTP server. My C# program always said protocol violation, CR must be followed by LF. I know ...
Andy's user avatar
  • 407
0 votes
2 answers
3k views

Transfer-Encoding: chunked-- Browser does not respond

I have made a very simple web server on my LINUX machine using TCP socket programming in C language.I am sending it a HTTP GET request from a browser(both chrome and mozilla ) from the local machine. ...
jps's user avatar
  • 183
0 votes
0 answers
448 views

extract http body from http response

I have written a program that take a .pcap file that is an output of wireshark capture and contains response of an image request. my program has to gather the http body data from the packets and ...
user2236835's user avatar
0 votes
1 answer
74 views

how to see PHP response when calling from console?

I have a C program that calls a PHP script. My question is how do I get the script's response parameters such as status code(to know if everything ended ok) or body? Of course I need to do different ...
user1908466's user avatar
14 votes
1 answer
45k views

In C, how do you use libcurl to read a HTTP response into a string?

I have homework where I need somehow to compare two HTTP responses. I am writing it on C and I use libcurl to make things easier. I am calling the function that uses libcurl to do a HTTP request and ...
empty set's user avatar
  • 183
1 vote
1 answer
2k views

Disassemble HTTP Response (C)

In continuation of this question I ask the following question. I've managed to read and understand what D.Shawley has recommended and I already finished a lot of work. But a problem occured to me ...
v1Axvw's user avatar
  • 3,054