summaryrefslogtreecommitdiffhomepage
path: root/src/go/unit (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2019-12-24Go: moving source files to the root of the project.Max Romanov8-820/+0
This patch includes packaging changes related to files move.
2019-12-24Go: linking against libunit.Max Romanov1-0/+10
2019-11-11Fixing libunit 'off by 2' issue in library.Max Romanov1-1/+1
Name and value in each header are 0-terminated, so additional 2 bytes should be allocated for them. There were several attempts to add these 2 bytes to headers in language modules, but some modules weren't updated. Also, adding these 2 bytes is specific to the implementation which may be changed later, so extending this mechanics to modules may cause errors.
2019-10-01Go: fixing header buffer size calculation.Max Romanov1-1/+1
Header names and values are stored 0-terminated for ease of use in different languages, so magic number 2 should be added to each name-value pair size.
2019-09-18Go: removing nxt_main.h usage.Max Romanov1-3/+2
One small step to Go modules support.
2019-09-18Go: do not store pointer to Go object.Max Romanov2-2/+49
To pass Go object references to C and back we use hack with casting to unsafe and then to uintptr. However, we should not store such references because Go not guaratnee it will be available by the same address. Introducing map with integer key helps to avoid dereference stored address. This closes #253 and #309 issues on GitHub.
2019-03-21Adjusting request schema value according to connection tls state.Max Romanov2-0/+11
This closes #223 issue on GitHub.
2019-02-27Fixed processing of SERVER_NAME after 77aad2c142a0.Valentin Bartenev1-5/+2
Previously, the nxt_router_prepare_msg() function expected server host among other headers unmodified. It's not true anymore since normalization of the Host header has been introduced in 77aad2c142a0. The nxt_unit_split_host() function was removed. It didn't work correctly with IPv6 literals. Anyway, after 77aad2c142a0 the port splitting is done in router while Host header processing.
2018-10-02Go: fixing typo in log messages.Max Romanov2-2/+2
2018-08-06Unit application library.Max Romanov20-1842/+388
Library now used in all language modules. Old 'nxt_app_*' code removed. See src/test/nxt_unit_app_test.c for usage sample.
2018-07-12Go: http.Flusher implemented by unit.response.Max Romanov3-0/+27
This closes #133 issue on GitHub.
2018-06-28Removed -mmacosx-version-min option.Igor Sysoev1-13/+0
2018-06-25Introduced nxt_length() macro.Valentin Bartenev1-1/+1
2018-04-20Go: fixed request.Read() behaviour for EOF.Max Romanov1-1/+6
This closes #108 issue on GitHub.
2018-04-06Go: Forced WriteHeader after application request processing.Max Romanov1-0/+4
Application should create response for every request. If not, Unit package will do it.
2018-03-06Added support for shm_open(SHM_ANON) extension.Sergey Kandaurov1-0/+12
2018-01-11Fixed DragonFly BSD shared memory implementation.Igor Sysoev1-1/+2
2017-12-28Fixed Go package and PHP module building.0.3Igor Sysoev1-1/+1
Go package and PHP module could not be built after changeset 5817734dd9b9.
2017-12-28HTTP keep-alive connections support.Igor Sysoev1-1/+1
2017-12-27Implementing the ability to cancel request before worker starts processing it.Max Romanov7-72/+91
2017-12-13Introducing Unit version check in Go package.Max Romanov3-30/+55
To communicate with the Go program, Unit setup environment variable named NXT_GO_PORTS with value contains Unit version, stream id to confirm application is started, and Unit ports information. Go Unit package parses this string and compares runtime version with compile time version. In case of parse error or version mismatch, ListenAndServe() returns with the error.
2017-12-06Go: removing request registry.Max Romanov11-244/+96
Passing unsafe.Pointers (void *) from Go to C is complicated by an attempt to make such pointers less unsafe. A straightforward optimization is to replace 'unsafe.Pointer' with 'uintptr' (thanks to Xin Huang for the idea: https://stackoverflow.com/a/44826533 ). As a result, request registry with mutex is gone.
2017-12-05Fixing Go package build in NetBSD.Max Romanov1-1/+1
Bug introduced in 585c8068a6d7.
2017-12-01Making Go package source distributable and renaming to 'nginx/unit'.Max Romanov8-85/+34
All header files are copied to Go package sources. As the result, package can be (re-)build when required. This closes #23 issue on GitHub.
2017-12-01Initializing port_msg fields with zeroes in Go package.Max Romanov2-0/+4
2017-10-27Fixing racing condition in request.msgs usage.Max Romanov1-8/+8
2017-10-27Fixing Go program crash.Max Romanov1-2/+2
Go request registration should be removed before C request memory freed. C request address used as a key in Go map. Freed memory can be instantly reused for other request and older request registration should removed at this point to avoid collisions.
2017-10-19Fixing Go package build.Max Romanov5-14/+21
Go package build was broken by change 365:28b2a468be43.
2017-10-19Introducing src_pid for mmap header for accurate buf completion.Max Romanov1-2/+3
This allows to use shared memory to communicate with main process. This patch changes shared memory segment format and breaks compatibility with older modules.
2017-09-18Fixing shared memory thread safety issue.Max Romanov2-1/+6
Do not reuse shared memory segment with different port until this segment successfully received and indexed on other side. However, segment can be used to transfer data via the port it was sent at any time.
2017-09-15Go: Fixed a bug introduced in the previous changeset.Igor Sysoev1-1/+1
2017-09-08Cosmetic fixes in port.go.Sergey Fedchenko1-33/+35
This closes #5 on GitHub. From 615369a29511c6021e5623070f082fdb17ff37a2
2017-09-06Style fixes.Igor Sysoev6-43/+68
2017-08-31nginext has been renamed to unit.Igor Sysoev20-0/+2285