Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.

Conversation

@alejandro-colomar
Copy link
Contributor

@alejandro-colomar alejandro-colomar commented May 22, 2023

  • Docs: added libunit manual pages.
  • Add UTF-8 renderings of the libunit manual pages

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, or cat, as you
prefer.

For the ASCII renderings (.ascii.cat), cat or less will be enough.

Cc: @andreivasiliu
Cc: @junsoo999
Cc: @ac000
Cc: @artemkonev

@alejandro-colomar alejandro-colomar changed the title Man Manual pages for libunit. May 22, 2023
@alejandro-colomar alejandro-colomar linked an issue May 22, 2023 that may be closed by this pull request
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>
@alejandro-colomar
Copy link
Contributor Author

alejandro-colomar commented May 24, 2023

PDF version:

libunit_manual.pdf

Comment on lines +24 to +25
.MR nxt_unit_done 3
destroys a context object in a Unit application.
Copy link
Contributor

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).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, worth mentioning.

Comment on lines +32 to +35
This function does not read
the header fields nor the request line,
which are available in
.IR req\->request .
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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 .
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks!

@alejandro-colomar alejandro-colomar closed this by deleting the head repository Sep 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation for libunit

2 participants