Welcome! Log In Create A New Profile

Advanced

RE: Get ngx_http_request_t as a char array

March 02, 2015 04:10AM
Hi All.
I've asked this question, and didn't get any solution for this.
So I decided to write my own module to solve my own problem :)

Checkout my module https://github.com/flaxtonio/nginx-flaxton-logger-module
, and let me know if you will have some suggestions for it.

Maxim Dounin.
Thanks for your response.
To transfer Request into a char * array I've crated functionality for it in
this module.
Let me know if it works wrong for you.

Thanks.

-----Original Message-----
From: nginx-devel-bounces@nginx.org [mailto:nginx-devel-bounces@nginx.org]
On Behalf Of Maxim Dounin
Sent: Friday, February 27, 2015 4:24 PM
To: nginx-devel@nginx.org
Subject: Re: Get ngx_http_request_t as a char array

Hello!

On Fri, Feb 27, 2015 at 02:56:46PM +0400, Tigran Bayburtsyan wrote:

> Hi.
>
> I'm trying to make a smart logging module for Nginx and I need to get
> all HTTP request from client as a string (char *).
>
> I know that ngx_http_request_t contains all HTTP request data , but I
> don't need to make a loop through all headers_in parameters or request
> structure parameters.
>
> I want to get all request with body as a char * array, like Nginx is
> receiving from tcp socket.

There are two problems here:

- nginx is not receiving a request as a string from tcp socket,
even if you talk about headers only;

- consequently, it is not available as a string within nginx.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel


---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Get ngx_http_request_t as a char array

tigran.bayburtsyan 741 February 27, 2015 05:58AM

Re: Get ngx_http_request_t as a char array

Maxim Dounin 285 February 27, 2015 07:24AM

RE: Get ngx_http_request_t as a char array

tigran.bayburtsyan 420 February 27, 2015 07:42AM

RE: Get ngx_http_request_t as a char array

tigran.bayburtsyan 445 March 02, 2015 04:10AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 276
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready