-
Notifications
You must be signed in to change notification settings - Fork 347
Manual pages for libunit. #891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Cc: Andrew Clayton <a.clayton@nginx.com> Cc: Artem Konev <a.konev@f5.com> Signed-off-by: Alejandro Colomar <alx@nginx.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
With some tweaks to remove any highlighting, and so that each bytes uses one column. Signed-off-by: Alejandro Colomar <alx@nginx.com>
PDF version: |
.MR nxt_unit_done 3 | ||
destroys a context object in a Unit application. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth noting that this must happen before the parent context is destroyed (at least as far as I understand from looking at the code).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, worth mentioning.
This function does not read | ||
the header fields nor the request line, | ||
which are available in | ||
.IR req\->request . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function may also read less than the Content-Length if a data_handler callback is defined, in which case the full body may or may not be available in request_handler.
If it is available, then it can be read, and data_handler() will not be called.
If it is not available, then data_handler() will be called, at which point it will be available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Do you know if there's any way to know how much is available before actually attempting to read? Or do you just read and then know if it's available?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There isn't as far as I can see, although I'd like to know that myself as well.
The response should have enough remaining buffer size available. | ||
If there's not enough, | ||
more buffer can be allocated with | ||
.MR nxt_unit_response_buff_alloc 3 . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in buff
. There are a few more cases below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This PR adds UTF-8 formatted renderings (.utf8.cat) of the pages. The intention is
not to add those to Unit, but I have them in the PR to make it easy to
comment on the rendered code. Also, future versions of the PR will
show the interdiff against old renderings, which is nice. Prior to
applying the patch, the renderings will be removed.
To see them, you can just run
less -R
, orcat
, as youprefer.
For the ASCII renderings (.ascii.cat),
cat
orless
will be enough.Cc: @andreivasiliu
Cc: @junsoo999
Cc: @ac000
Cc: @artemkonev