Skip to content

Conversation

@msva
Copy link

@msva msva commented Sep 27, 2014

Some usefull status constants + prerequisite for #397

@agentzh
Copy link
Member

agentzh commented Oct 1, 2014

@msva Thank you for looking into this. Two issues in your patch though:

  1. Will you just add the constants you actually need? I'd rather add such constants only on actual user demand because they add extra overhead.
  2. Please avoid using the C99 single-line comment syntax (i.e., // xxx) which violates the nginx coding style :)

@msva
Copy link
Author

msva commented Oct 1, 2014

Hi.

  1. Not that I really _need_ them (I currently have to use integers in the code instead of that missed constants), just I looked in the NgX constants header and added here all of missing (in comparsion with it) values. Plus few "just usefull ones" (missed even there), like 426 and 429, for example. Plus non-standard ones, used by Cloudflare (520-524), but having usefull meaning.

But, yes, initially, my idea about making this patch, started from my personal need of 100, 204, 206 and 409 statuses in exact small project ;)
-- and thoughts, that most of that new constants I'd use in another one a bit later ;)

  1. Okay. But will it be enough to just remove comments? Will it make patch accepatble, or do you insist that I reduced constants count? ;)

@agentzh
Copy link
Member

agentzh commented Oct 2, 2014

@msva I insist that we should only add constants actually used :)

@msva msva force-pushed the patch-1 branch 3 times, most recently from 6f51ae9 to 6b6098f Compare October 5, 2014 15:37
@msva
Copy link
Author

msva commented Oct 5, 2014

I've removed comments and reduced constants count.
Now it is only that ones, using in real projects ;)

@agentzh
Copy link
Member

agentzh commented Oct 9, 2014

@msva Thanks! I'll look into this :)

@sirupsen
Copy link

sirupsen commented Feb 9, 2015

Would like to see this in too! We use/will use a few of those as well (HTTP_CONTINUE, HTTP_NO_CONTENT, HTTP_TOO_MANY_REQUESTS)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line breaks backward-compatibility.

@msva msva force-pushed the patch-1 branch 2 times, most recently from 933dbac to 5f1b3fe Compare June 20, 2015 19:39
@msva
Copy link
Author

msva commented Jun 20, 2015

@agentzh ping? ;) Can you look into this once again? 😉

@agentzh
Copy link
Member

agentzh commented Jun 21, 2015

@msva Sorry for the delay on my side. Will you update the document in the file doc/HttpLuaModule.wiki for this change? Thanks!

@msva
Copy link
Author

msva commented Jun 21, 2015

I almost did it already, but should I also add comments like "first added in XXX release"? ;) If so — I need to know, which release will be next: 0.9.16 or rc2 ;)

@msva
Copy link
Author

msva commented Jun 21, 2015

anyway, here is next proposition ;)

@agentzh
Copy link
Member

agentzh commented Jun 21, 2015

@msva Cool, thanks!

@msva
Copy link
Author

msva commented Jun 21, 2015

there was a little mistake (I confused HTTP_VERSION_NOT_SUPPORTED's code in the source (and wrote fine in wiki). Fixed now ;)

// Btw, I thinking about renaming it to HTTP_VERSION_UNSUPPORTED and also about adding CloudFlare's 520 Unknown Error

How do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be 101 instead of 102, right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup. Fixed.

@msva
Copy link
Author

msva commented Jul 25, 2015

ping? Should I drop the codes you've commented above, or it is not that necessarily ;)

agentzh added a commit that referenced this pull request Dec 11, 2015
…s Vadim A. Misbakh-Soloviov for the patch in #425.
@agentzh
Copy link
Member

agentzh commented Dec 11, 2015

@msva Patch applied to git master. Thanks for your contribution and sorry for the long delay on my side.

@agentzh agentzh closed this Dec 11, 2015
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.

3 participants