Skip to content

Conversation

mtourne
Copy link

@mtourne mtourne commented Apr 26, 2012

No description provided.

agentzh added a commit that referenced this pull request May 14, 2012
… added 073-backtrace.t to test it. see github pull request #107.
agentzh added a commit that referenced this pull request May 15, 2012
…uest header and could hang. thanks Matthieu Tourne for the patch in pull request #107.
Matthieu Tourne and others added 13 commits May 15, 2012 11:12
Conflicts:
	src/ngx_http_lua_socket.c
	src/ngx_http_lua_util.c
	t/067-req-socket.t
…the current lua source file name (if any), the current source line number, and the current calling lua function name (if any), into the nginx error.log file. thanks Matthieu Tourne for the patch.
….log() and print(). thanks Matthieu Tourne for the patch.
fixed minor grammatical errors in the README.markdown file
@agentzh
Copy link
Member

agentzh commented May 22, 2012

In the "prefix-var" branch, I've renamed $ngx_prefix to $prefix and the notation ${prefix} is also supported :)

@mtourne
Copy link
Author

mtourne commented May 22, 2012

Just received the merge request, but I assume you or chaoslawful want to
merge it back into master.

Let me know how we should organize the workflow :)

Matt

On Tue, May 22, 2012 at 1:22 AM, agentzh (章亦春) <
reply@reply.github.com

wrote:

In the "prefix-var" branch, I've renamed $ngx_prefix to $prefix and the
notation ${prefix} is also supported :)


Reply to this email directly or view it on GitHub:

#107 (comment)

@agentzh
Copy link
Member

agentzh commented May 23, 2012

On Wed, May 23, 2012 at 1:30 AM, Matthieu Tourne
reply@reply.github.com
wrote:

Just received the merge request, but I assume you or chaoslawful want to
merge it back into master.

Let me know how we should organize the workflow :)

I'll review and merge your changes (either in a custom branch in the
official repos or any branch in your own fork repos) into "master" :)
Thanks!

Regards,
-agentzh

@agentzh
Copy link
Member

agentzh commented May 23, 2012

On Wed, May 23, 2012 at 1:30 AM, Matthieu Tourne
reply@reply.github.com
wrote:

Just received the merge request, but I assume you or chaoslawful want to
merge it back into master.

Let me know how we should organize the workflow :)

One more small suggestion: could you please put each independent
change set into separate branches (either in your own fork repos or in
the mainstream repos) for future development? I mean branch names like
receiveuntil-inclusive, expect-fixes, new-req-api, and logby, instead
of putting everything into a single "master" branch or something like
that. By doing this, it can give me more freedom in merging your
patches by any order and it can ensure independencies among these
change sets ;)

Thank you so much for those excellent patches! I'll surely speed up
merging your patches into the mainstream master ;)

Thanks again!
-agentzh

@mtourne
Copy link
Author

mtourne commented May 23, 2012

On Wed, May 23, 2012 at 8:42 AM, agentzh (章亦春) <
reply@reply.github.com

wrote:

On Wed, May 23, 2012 at 1:30 AM, Matthieu Tourne
reply@reply.github.com
wrote:

Just received the merge request, but I assume you or chaoslawful want to
merge it back into master.

Let me know how we should organize the workflow :)

One more small suggestion: could you please put each independent
change set into separate branches (either in your own fork repos or in
the mainstream repos) for future development? I mean branch names like
receiveuntil-inclusive, expect-fixes, new-req-api, and logby, instead
of putting everything into a single "master" branch or something like
that. By doing this, it can give me more freedom in merging your
patches by any order and it can ensure independencies among these
change sets ;)

Ok, I'll do that for any new feature I'm adding from now on.

I don't know how to separate the existing commits into different branches
:|

Thank you so much for those excellent patches! I'll surely speed up
merging your patches into the mainstream master ;)

Thanks again!
-agentzh


Reply to this email directly or view it on GitHub:

#107 (comment)

@agentzh
Copy link
Member

agentzh commented May 24, 2012

On Wed, May 23, 2012 at 11:45 PM, Matthieu Tourne
reply@reply.github.com
wrote:

Ok, I'll do that for any new feature I'm adding from now on.

Thank you very much!

I don't know how to separate the existing commits into different branches
:|

git co my-new-feature-branch
git cherry-pick <commit-id>

If the existing commits are too hard to cherry pick (due to non-atomic
commits), just leave them as is. I can handle that on my side by
applying your patches manually from the "master" branch in your fork
repos ;)

This is just a suggestion for your future development ;)

Thanks!
-agentzh

@mtourne
Copy link
Author

mtourne commented May 25, 2012

On Wed, May 23, 2012 at 6:56 PM, agentzh (章亦春)
reply@reply.github.com
wrote:

On Wed, May 23, 2012 at 11:45 PM, Matthieu Tourne
reply@reply.github.com
wrote:

Ok, I'll do that for any new feature I'm adding from now on.

Thank you very much!

I don't know how to separate the existing commits into different branches
:|

   git co my-new-feature-branch
   git cherry-pick

If the existing commits are too hard to cherry pick (due to non-atomic
commits), just leave them as is. I can handle that on my side by
applying your patches manually from the "master" branch in your fork
repos ;)

This is just a suggestion for your future development ;)

I will definitely observe that for future developments, been too busy
to put them back in their own branches.
I think the only thing you're missing from me is the ngx.init_body(),
ngx.append_body(), ngx.finish_body()

And the last ngx.decode_args()

I merged all the other changes that you backported with modifications

@agentzh
Copy link
Member

agentzh commented May 26, 2012

Hello!

On Sat, May 26, 2012 at 2:40 AM, Matthieu Tourne
reply@reply.github.com
wrote:

I will definitely observe that for future developments, been too busy
to put them back in their own branches.

Understood :)

I think the only thing you're missing from me is the ngx.init_body(),
ngx.append_body(), ngx.finish_body()

And the last ngx.decode_args()

I merged ngx.decode_args() into master yesterday on the train. Until
now, the missing bits are:

  1. ngx.req.init_body(), ngx.req.append_body(), and
    ngx.req.finish_body() (already in the "req-body" branch, but not ready
    to be merged into "master" yet).
  2. log_by_lua and log_by_lua_file (already in the "logby" branch, but
    not ready to be merged into "master")
  3. the rewrite_by_lua_no_postpone directive (already in the
    "no-postpone" branch, but not ready to be merged into "master" yet).
  4. the inclusive option for cosocket:receiveuntil().

But I'm now wondering

  1. if you have the tuits to add some test cases and docs to the branch
    "req-body",

  2. what's your intention of manipulating "rb->rest" in
    ngx_http_lua_ngx_req_init_body() in the commit e0eea53:

    commit e0eea53
    Author: Matthieu Tourne matthieu@cloudflare.com
    Date: Sat Apr 21 16:37:41 2012 -0700

    Fix issues with POST using http 1.1 (test for expect)

  3. what's your intention of scaling the size argument by 50% in
    ngx_http_lua_ngx_req_init_body(), which is not appropriate in my
    opinion, and

  4. if you have tested your patch for the inclusive option for
    receiveuntil() with very small buffer size (because buffer handling in
    your patch looks not quite right to me).

I merged all the other changes that you backported with modifications

I've noticed that and I'm trying to tweak your existing commits
instead of manually applying modified versions of your patches to
reduce merge conflicts on your side.

Thank you!
-agentzh

@agentzh
Copy link
Member

agentzh commented May 27, 2012

Status update:

  1. The "no-postpone" branch has already been merged into "master".
  2. I've fixed the receiveuntil() inclusive mode for small buffers in the "inclusive" branch.

@mtourne
Copy link
Author

mtourne commented May 29, 2012

On Sat, May 26, 2012 at 5:56 AM, agentzh (章亦春)
reply@reply.github.com
wrote:

Hello!

On Sat, May 26, 2012 at 2:40 AM, Matthieu Tourne
reply@reply.github.com
wrote:

I will definitely observe that for future developments, been too busy
to put them back in their own branches.

Understood :)

I think the only thing you're missing from me is the ngx.init_body(),
ngx.append_body(), ngx.finish_body()

And the last ngx.decode_args()

I merged ngx.decode_args() into master yesterday on the train. Until
now, the missing bits are:

  1. ngx.req.init_body(), ngx.req.append_body(), and
    ngx.req.finish_body() (already in the "req-body" branch, but not ready
    to be merged into "master" yet).
  2. log_by_lua and log_by_lua_file (already in the "logby" branch, but
    not ready to be merged into "master")
  3. the rewrite_by_lua_no_postpone directive (already in the
    "no-postpone" branch, but not ready to be merged into "master" yet).
  4. the inclusive option for cosocket:receiveuntil().

But I'm now wondering

  1. if you have the tuits to add some test cases and docs to the branch
    "req-body",

I don't really have test cases, I have a multipart.lua (heavily
insipired from upload.lua), it seems to work well so far.

  1. what's your intention of manipulating "rb->rest" in
    ngx_http_lua_ngx_req_init_body() in the commit e0eea53:

   commit e0eea53
   Author: Matthieu Tourne matthieu@cloudflare.com
   Date:   Sat Apr 21 16:37:41 2012 -0700

   Fix issues with POST using http 1.1 (test for expect)

  1. what's your intention of scaling the size argument by 50% in
    ngx_http_lua_ngx_req_init_body(), which is not appropriate in my
    opinion, and

Both those were inspired from ngx_http_request_body.c in Nginx core

Line 190:
size = clcf->client_body_buffer_size;
size += size >> 2;

  1. if you have tested your patch for the inclusive option for
    receiveuntil() with very small buffer size (because buffer handling in
    your patch looks not quite right to me).

I merged all the other changes that you backported with modifications

I've noticed that and I'm trying to tweak your existing commits
instead of manually applying modified versions of your patches to
reduce merge conflicts on your side.

I thought this was how it would work :

  1. I would make a little scrappy patch to add a feature
  2. send a pull requests
  3. you would comment on the style, or the lack of test or documentation,
  4. I would rework it a little
  5. we're both happy with it, you can integrate it \o/

Next feature, I'm doing a branch on the chaoslawful repo and we can
work this way.

The extra work should be on me, clean up etc so you can integrate it.

Thank you!
-agentzh


Reply to this email directly or view it on GitHub:
#107 (comment)

@mtourne mtourne merged commit c5016c1 into openresty:master May 29, 2012
@mtourne
Copy link
Author

mtourne commented May 29, 2012

Sorry sorry sorry, I pushed some bad code on the master :( :(
I suck at git ..

On Tue, May 29, 2012 at 10:41 AM, Matthieu Tourne
matthieu.tourne@gmail.com wrote:

On Sat, May 26, 2012 at 5:56 AM, agentzh (章亦春)
reply@reply.github.com
wrote:

Hello!

On Sat, May 26, 2012 at 2:40 AM, Matthieu Tourne
reply@reply.github.com
wrote:

I will definitely observe that for future developments, been too busy
to put them back in their own branches.

Understood :)

I think the only thing you're missing from me is the ngx.init_body(),
ngx.append_body(), ngx.finish_body()

And the last ngx.decode_args()

I merged ngx.decode_args() into master yesterday on the train. Until
now, the missing bits are:

  1. ngx.req.init_body(), ngx.req.append_body(), and
    ngx.req.finish_body() (already in the "req-body" branch, but not ready
    to be merged into "master" yet).
  2. log_by_lua and log_by_lua_file (already in the "logby" branch, but
    not ready to be merged into "master")
  3. the rewrite_by_lua_no_postpone directive (already in the
    "no-postpone" branch, but not ready to be merged into "master" yet).
  4. the inclusive option for cosocket:receiveuntil().

But I'm now wondering

  1. if you have the tuits to add some test cases and docs to the branch
    "req-body",

I don't really have test cases, I have a multipart.lua (heavily
insipired from upload.lua), it seems to work well so far.

  1. what's your intention of manipulating "rb->rest" in
    ngx_http_lua_ngx_req_init_body() in the commit e0eea53:

   commit e0eea53
   Author: Matthieu Tourne matthieu@cloudflare.com
   Date:   Sat Apr 21 16:37:41 2012 -0700

   Fix issues with POST using http 1.1 (test for expect)

  1. what's your intention of scaling the size argument by 50% in
    ngx_http_lua_ngx_req_init_body(), which is not appropriate in my
    opinion, and

Both those were inspired from ngx_http_request_body.c in Nginx core

Line 190:
   size = clcf->client_body_buffer_size;
   size += size >> 2;

  1. if you have tested your patch for the inclusive option for
    receiveuntil() with very small buffer size (because buffer handling in
    your patch looks not quite right to me).

I merged all the other changes that you backported with modifications

I've noticed that and I'm trying to tweak your existing commits
instead of manually applying modified versions of your patches to
reduce merge conflicts on your side.

I thought this was how it would work :

  1. I would make a little scrappy patch to add a feature
  2. send a pull requests
  3. you would comment on the style, or the lack of test or documentation,
  4. I would rework it a little
  5. we're both happy with it, you can integrate it \o/

Next feature, I'm doing a branch on the chaoslawful repo and we can
work this way.

The extra work should be on me, clean up etc so you can integrate it.

Thank you!
-agentzh


Reply to this email directly or view it on GitHub:
#107 (comment)

@mtourne
Copy link
Author

mtourne commented May 29, 2012

I reverted the whole commit, we can drop it from the history if you
want. But I thought you'd prefer not to do that.

On Tue, May 29, 2012 at 3:40 PM, Matthieu Tourne
matthieu.tourne@gmail.com wrote:

Sorry sorry sorry, I pushed some bad code on the master :( :(
I suck at git ..

On Tue, May 29, 2012 at 10:41 AM, Matthieu Tourne
matthieu.tourne@gmail.com wrote:

On Sat, May 26, 2012 at 5:56 AM, agentzh (章亦春)
reply@reply.github.com
wrote:

Hello!

On Sat, May 26, 2012 at 2:40 AM, Matthieu Tourne
reply@reply.github.com
wrote:

I will definitely observe that for future developments, been too busy
to put them back in their own branches.

Understood :)

I think the only thing you're missing from me is the ngx.init_body(),
ngx.append_body(), ngx.finish_body()

And the last ngx.decode_args()

I merged ngx.decode_args() into master yesterday on the train. Until
now, the missing bits are:

  1. ngx.req.init_body(), ngx.req.append_body(), and
    ngx.req.finish_body() (already in the "req-body" branch, but not ready
    to be merged into "master" yet).
  2. log_by_lua and log_by_lua_file (already in the "logby" branch, but
    not ready to be merged into "master")
  3. the rewrite_by_lua_no_postpone directive (already in the
    "no-postpone" branch, but not ready to be merged into "master" yet).
  4. the inclusive option for cosocket:receiveuntil().

But I'm now wondering

  1. if you have the tuits to add some test cases and docs to the branch
    "req-body",

I don't really have test cases, I have a multipart.lua (heavily
insipired from upload.lua), it seems to work well so far.

  1. what's your intention of manipulating "rb->rest" in
    ngx_http_lua_ngx_req_init_body() in the commit e0eea53:

   commit e0eea53
   Author: Matthieu Tourne matthieu@cloudflare.com
   Date:   Sat Apr 21 16:37:41 2012 -0700

   Fix issues with POST using http 1.1 (test for expect)

  1. what's your intention of scaling the size argument by 50% in
    ngx_http_lua_ngx_req_init_body(), which is not appropriate in my
    opinion, and

Both those were inspired from ngx_http_request_body.c in Nginx core

Line 190:
   size = clcf->client_body_buffer_size;
   size += size >> 2;

  1. if you have tested your patch for the inclusive option for
    receiveuntil() with very small buffer size (because buffer handling in
    your patch looks not quite right to me).

I merged all the other changes that you backported with modifications

I've noticed that and I'm trying to tweak your existing commits
instead of manually applying modified versions of your patches to
reduce merge conflicts on your side.

I thought this was how it would work :

  1. I would make a little scrappy patch to add a feature
  2. send a pull requests
  3. you would comment on the style, or the lack of test or documentation,
  4. I would rework it a little
  5. we're both happy with it, you can integrate it \o/

Next feature, I'm doing a branch on the chaoslawful repo and we can
work this way.

The extra work should be on me, clean up etc so you can integrate it.

Thank you!
-agentzh


Reply to this email directly or view it on GitHub:
#107 (comment)

@mtourne
Copy link
Author

mtourne commented Jun 1, 2012

Hello!

On Wed, May 30, 2012 at 1:41 AM, Matthieu Tourne
matthieu.tourne@gmail.com wrote:

But I'm now wondering

  1. if you have the tuits to add some test cases and docs to the branch
    "req-body",

I don't really have test cases, I have a multipart.lua (heavily
insipired from upload.lua), it seems to work well so far.

It's considered good practice to add test cases to ngx_lua's test
suite when adding new features or fixing existing bugs in ngx_lua :)

  1. what's your intention of manipulating "rb->rest" in
    ngx_http_lua_ngx_req_init_body() in the commit e0eea53:

   commit e0eea53
   Author: Matthieu Tourne matthieu@cloudflare.com
   Date:   Sat Apr 21 16:37:41 2012 -0700

   Fix issues with POST using http 1.1 (test for expect)

  1. what's your intention of scaling the size argument by 50% in
    ngx_http_lua_ngx_req_init_body(), which is not appropriate in my
    opinion, and

Both those were inspired from ngx_http_request_body.c in Nginx core

Line 190:
   size = clcf->client_body_buffer_size;
   size += size >> 2;

Fair enough :)

But what about rb->rest? This is used by
ngx_http_read_client_request_body while reading the input data stream.
I'm wondering about its usage here :)

  1. if you have tested your patch for the inclusive option for
    receiveuntil() with very small buffer size (because buffer handling in
    your patch looks not quite right to me).

I merged all the other changes that you backported with modifications

I've noticed that and I'm trying to tweak your existing commits
instead of manually applying modified versions of your patches to
reduce merge conflicts on your side.

I thought this was how it would work :

  1. I would make a little scrappy patch to add a feature
  2. send a pull requests
  3. you would comment on the style, or the lack of test or documentation,
  4. I would rework it a little
  5. we're both happy with it, you can integrate it \o/

Next feature, I'm doing a branch on the chaoslawful repo and we can
work this way.

The extra work should be on me, clean up etc so you can integrate it.

That looks cool to me :)

Thanks!
-agentzh

@agentzh
Copy link
Member

agentzh commented Jun 16, 2012

I've just merged the "inclusive" branch into "master". This feature is expected to be included in the next ngx_lua release 0.5.1 :)

Now for all your patches in this pull request, the only missing bit is the ngx.req.init_body(), ngx.req.append_body(), and ngx.req.finish_body() API included in the "req-body" branch that has not yet been merged into "master". I'm still working on it :)

BTW, I've already applied a modified version of your patches in the "cleanup" branch. Can I remove the "cleanup" branch for you?

@agentzh
Copy link
Member

agentzh commented Jun 16, 2012

Do you have the tuits to add some docs and tests to the "req-body" branch for the ngx.req.init_body(), ngx.req.append_body(), and ngx.req.finish_body() API?

BTW, both README and README.markdown are automatically generated from docs/HttpLuaModule.wiki by the scripts here:

https://github.com/agentzh/nginx-devel-utils

Basically I just run the top-level script "ngx-releng" ;)

@dakanji
Copy link

dakanji commented Jun 16, 2012

If you simply copy "docs/HttpLuaModule.wiki" and save it as "README.mediawiki" in the top level directory, you can remove "README" and "README.markdown" and you will have your readme file with all your mediawiki style formatting maintained.

@agentzh
Copy link
Member

agentzh commented Jun 16, 2012

Hello!

On Sat, Jun 16, 2012 at 9:22 PM, dakanji
reply@reply.github.com
wrote:

If you simply copy "docs/HttpLuaModule.wiki" and save it as "README.mediawiki" in the top level directory, you can remove "README" and "README.markdown" and you will have your readme file with all your mediawiki style formatting maintained.

No, not really, a lot of links in docs/HttpLuaModule.wiki require
relocating because they're only meaningful to the wiki.nginx.org site.

Regards,
-agentzh

@dakanji
Copy link

dakanji commented Jun 16, 2012

Yes. A lot of them are just "#XYZ".

However, since these need to be fixed with the full URLs in any case, perhaps just a "find and replace" to convert them to "FULL/URL/TO/WIKI/LUA/DOCS#XYZ" and use the "mediawiki" extension to get the formatting benefits and also avoid the current need for two readme files.

bakins pushed a commit to bakins/lua-nginx-module that referenced this pull request Jun 30, 2012
… added 073-backtrace.t to test it. see github pull request openresty#107.
bakins pushed a commit to bakins/lua-nginx-module that referenced this pull request Jun 30, 2012
…uest header and could hang. thanks Matthieu Tourne for the patch in pull request openresty#107.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants