Mercurial > hg > nginx
comparison src/http/modules/ngx_http_scgi_module.c @ 5078:10c74d3b15d1
Connection upgrade support in uwsgi and scgi modules.
Prodded by Roberto De Ioris.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 20 Feb 2013 16:41:05 +0000 |
parents | fd84344f1df7 |
children | 8da37c1b22a4 |
comparison
equal
deleted
inserted
replaced
5077:9ea42922a395 | 5078:10c74d3b15d1 |
---|---|
982 "http scgi header done"); | 982 "http scgi header done"); |
983 | 983 |
984 u = r->upstream; | 984 u = r->upstream; |
985 | 985 |
986 if (u->headers_in.status_n) { | 986 if (u->headers_in.status_n) { |
987 return NGX_OK; | 987 goto done; |
988 } | 988 } |
989 | 989 |
990 if (u->headers_in.status) { | 990 if (u->headers_in.status) { |
991 status_line = &u->headers_in.status->value; | 991 status_line = &u->headers_in.status->value; |
992 | 992 |
1011 ngx_str_set(&u->headers_in.status_line, "200 OK"); | 1011 ngx_str_set(&u->headers_in.status_line, "200 OK"); |
1012 } | 1012 } |
1013 | 1013 |
1014 if (u->state) { | 1014 if (u->state) { |
1015 u->state->status = u->headers_in.status_n; | 1015 u->state->status = u->headers_in.status_n; |
1016 } | |
1017 | |
1018 done: | |
1019 | |
1020 if (u->headers_in.status_n == NGX_HTTP_SWITCHING_PROTOCOLS | |
1021 && r->headers_in.upgrade) | |
1022 { | |
1023 u->upgrade = 1; | |
1016 } | 1024 } |
1017 | 1025 |
1018 return NGX_OK; | 1026 return NGX_OK; |
1019 } | 1027 } |
1020 | 1028 |