-
Notifications
You must be signed in to change notification settings - Fork 7.9k
RFC - Added the apache_connection_stream() function for CGI WebSockets #14047
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
RichardTMiles
wants to merge
12
commits into
php:master
Choose a base branch
from
RichardTMiles:apache_connection_stream
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
95ef44b
Adding PHP_FUNCTION apache_connection_stream to expose ap_get_conn_so…
RichardTMiles 84e35c1
Adding PHP_FUNCTION apache_connection_stream to expose ap_get_conn_so…
RichardTMiles 15cff3f
Added the apache_connection_stream() function for CGI WebSockets
RichardTMiles d4067d8
Cleaning commit, removing import
RichardTMiles 7adc1e1
updating branch name
RichardTMiles f9d4c05
Merge branch 'php:master' into apache_connection_stream
RichardTMiles 60c1d6f
untracking .DS_Store
RichardTMiles 137e296
Merge branch 'apache_connection_stream' of github.com:RichardTMiles/p…
RichardTMiles 73bb764
untracking .DS_Store
RichardTMiles 5c0084a
error handling
RichardTMiles bea8d2d
order of ZEND_PARSE_PARAMETERS_NONE
RichardTMiles 5641cf6
PHP CLISERVER apache_connection_stream function
RichardTMiles File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -215,23 +215,20 @@ php_stream * php_stream_url_wrap_php(php_stream_wrapper *wrapper, const char *pa | |
} | ||
|
||
if (!strcasecmp(path, "input")) { | ||
php_stream_input_t *input; | ||
|
||
php_stream_input_t *input; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
if ((options & STREAM_OPEN_FOR_INCLUDE) && !PG(allow_url_include) ) { | ||
if (options & REPORT_ERRORS) { | ||
php_error_docref(NULL, E_WARNING, "URL file-access is disabled in the server configuration"); | ||
} | ||
return NULL; | ||
} | ||
|
||
input = ecalloc(1, sizeof(*input)); | ||
if ((input->body = SG(request_info).request_body)) { | ||
php_stream_rewind(input->body); | ||
} else { | ||
} else { | ||
input->body = php_stream_temp_create_ex(TEMP_STREAM_DEFAULT, SAPI_POST_BLOCK_SIZE, PG(upload_tmp_dir)); | ||
SG(request_info).request_body = input->body; | ||
} | ||
|
||
} | ||
return php_stream_alloc(&php_stream_input_ops, input, 0, "rb"); | ||
} | ||
|
||
|
@@ -261,7 +258,7 @@ php_stream * php_stream_url_wrap_php(php_stream_wrapper *wrapper, const char *pa | |
if (!strcmp(sapi_module.name, "cli")) { | ||
static int cli_out = 0; | ||
fd = STDOUT_FILENO; | ||
if (cli_out++) { | ||
if (cli_out) { | ||
fd = dup(fd); | ||
} else { | ||
cli_out = 1; | ||
|
@@ -277,7 +274,7 @@ php_stream * php_stream_url_wrap_php(php_stream_wrapper *wrapper, const char *pa | |
if (!strcmp(sapi_module.name, "cli")) { | ||
static int cli_err = 0; | ||
fd = STDERR_FILENO; | ||
if (cli_err++) { | ||
if (cli_err) { | ||
fd = dup(fd); | ||
} else { | ||
cli_err = 1; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the comment at the top of this file: IDE specific files should be in a local .gitignore.