Bug 64330 - Env var H2_STREAM_ID & H2_STREAM_TAG not available anymore through apr_table 'r->subprocess_env'
Summary: Env var H2_STREAM_ID & H2_STREAM_TAG not available anymore through apr_table ...
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_http2 (show other bugs)
Version: 2.4.43
Hardware: Macintosh Linux
: P2 regression (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
: 64329 64331 64404 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-04-09 18:59 UTC by worlds.grid
Modified: 2020-05-02 20:33 UTC (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description worlds.grid 2020-04-09 18:59:25 UTC
Hi,

Just creating a C extension to handle HTTP2 requests, I noticed I couldn't access anymore to envvars 'H2_STREAM_ID' & 'H2_STREAM_TAG'.

The following C code should be sufficient to explain the case :


	ap_log_rerror(
		APLOG_MARK, APLOG_NOTICE|APLOG_ERR|APLOG_DEBUG, 0, r,
		"H2_STREAM_ID: '%s'"
		" / "
		"H2_STREAM_TAG: '%s'",
		apr_table_get(r->subprocess_env, "H2_STREAM_ID"),
		apr_table_get(r->subprocess_env, "H2_STREAM_TAG")
	);



On httpd-2.4.41 I get like :  H2_STREAM_ID: '13' / H2_STREAM_TAG: '7-13'

But on httpd-2.4.43 I always get :  H2_STREAM_ID: '(null)' / H2_STREAM_TAG: '000'


I cannot tell if that way to retrieve such values is right or not.
Perhaps this could have been wrongly exposed before and that's why they don't  exist anymore in that table?

I don't know, but if yes, could someone tell how to get that information properly?


Thanks
Comment 1 Christophe JAILLET 2020-04-10 10:34:42 UTC
*** Bug 64329 has been marked as a duplicate of this bug. ***
Comment 2 Christophe JAILLET 2020-04-10 10:35:01 UTC
*** Bug 64331 has been marked as a duplicate of this bug. ***
Comment 3 worlds.grid 2020-04-12 14:21:42 UTC
Hi,

Just additional precisions about it:

The behavior doesn't change according to the httpd daemon mod_http2.so is running on, but according to the branch of the source tree from which it has been built (2.4.41 or 2.4.43 in my case).


Thus it looks like:

 - building mod_http2.so from branch 2.4.41 will produce a .so file working fine while running under any httpd-2.4.x

 - building mod_http2.so from branch 2.4.43 will produde a .so file not able to return correctly aforementioned values, while running under any httpd-2.4.x


Hope it helps.
Comment 4 Stefan Eissing 2020-04-16 17:16:31 UTC
Fixed in trunk in r1876616. Will propose for backport.

 mod_http2: Fixed regression that no longer set H2_STREAM_ID and H2_STREAM_TAG.
 PR64330
Comment 5 Yann Ylavic 2020-05-02 20:33:11 UTC
*** Bug 64404 has been marked as a duplicate of this bug. ***