nghttpx: Fix bug that server push from mruby script did not work
This commit is contained in:
parent
4041d1eb26
commit
6f52da834b
|
@ -1893,7 +1893,8 @@ bool Http2Upstream::push_enabled() const {
|
|||
int Http2Upstream::initiate_push(Downstream *downstream, const StringRef &uri) {
|
||||
int rv;
|
||||
|
||||
if (uri.empty() || !push_enabled() || (downstream->get_stream_id() % 2)) {
|
||||
if (uri.empty() || !push_enabled() ||
|
||||
(downstream->get_stream_id() % 2) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -68,6 +68,9 @@ public:
|
|||
virtual int send_reply(Downstream *downstream, const uint8_t *body,
|
||||
size_t bodylen) = 0;
|
||||
|
||||
// Starts server push. The |downstream| is an associated stream for
|
||||
// the pushed resource. This function returns 0 if it succeeds,
|
||||
// otherwise -1.
|
||||
virtual int initiate_push(Downstream *downstream, const StringRef &uri) = 0;
|
||||
|
||||
// Fills response data in |iov| whose capacity is |iovcnt|. Returns
|
||||
|
|
Loading…
Reference in New Issue