Skip to content

http2+transfer+gnutls, upload eos/shutdown handling - #14253

Closed
icing wants to merge 3 commits into
curl:masterfrom
icing:http2_eos_flag
Closed

icing wants to merge 3 commits into
curl:masterfrom
icing:http2_eos_flag

Conversation

@icing

@icing icing commented Jul 22, 2024 •

Copy link
Copy Markdown
Contributor

http2, upload eos handling

  • replace the counting of upload lengths with the new eos send flag
  • improve frequency of stream draining to happen less on events where it is not needed
  • this PR is based on send eos flag #14220

test case improvement:

  • let client 'upload-pausing' handle http versions

transfer: force send/recv while shutdown of a direction is in progress.

gnutls: fix handling when sending the close notify blocks.

With these changes, the pytest cases work when simulating a 90% chance of socket write block.

@github-actions github-actions Bot added the tests label Jul 22, 2024
@icing icing added HTTP/2 feature-window A merge of this requires an open feature window labels Jul 23, 2024
@bagder

bagder commented Aug 3, 2024

Copy link
Copy Markdown
Member

This PR now has merge conflicts.

- replace the counting of upload lengths with the new eos
  send flag
- improve frequency of stream draining to happen less on
  events where it is not needed
- this PR is based on curl#14220

http2, cf-h2-proxy: fix EAGAINed out buffer
- in adjust pollset and shutdown handling, a non-empty `ctx->outbufq`
  must trigger send polling, irregardless of http/2 flow control
- in http2, fix retry handling of blocked GOAWAY frame

test case improvement:
- let client 'upload-pausing' handle http versions
icing added 2 commits August 4, 2024 11:07
Solves the problem of blocked sends during connect phase, observed
in a HTTP/2 proxy setup.
a transfer direction.

Fix gnutls shutdown handling when close notice sending was blocked.
@icing icing changed the title http2, upload eos handling http2+transfer+gnutls, upload eos/shutdown handling Aug 4, 2024
@bagder bagder closed this in 35bf766 Aug 5, 2024
vszakats added a commit that referenced this pull request Feb 5, 2025
…d()`

Before this patch it returned `CURLE_FAILED_INIT` on init failures, with
the value of 2. Fix it to return `false`.

Seen with clang 18.1.8:
```
../lib/transfer.c(181,12): warning: integer constant not in range of enumerated type 'bool' [-Wassign-enum]
  181 |     return CURLE_FAILED_INIT;
      |            ^
../lib/transfer.c(181,12): warning: implicit conversion from enumeration type 'CURLcode' to different enumeration type 'bool' [-Wenum-conversion]
  181 |     return CURLE_FAILED_INIT;
      |     ~~~~~~ ^~~~~~~~~~~~~~~~~
../lib/transfer.c(183,12): warning: integer constant not in range of enumerated type 'bool' [-Wassign-enum]
  183 |     return CURLE_FAILED_INIT;
      |            ^
../lib/transfer.c(183,12): warning: implicit conversion from enumeration type 'CURLcode' to different enumeration type 'bool' [-Wenum-conversion]
  183 |     return CURLE_FAILED_INIT;
      |     ~~~~~~ ^~~~~~~~~~~~~~~~~
```

Follow-up to 35bf766 #14253

Closes #16170
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
…d()`

Before this patch it returned `CURLE_FAILED_INIT` on init failures, with
the value of 2. Fix it to return `false`.

Seen with clang 18.1.8:
```
../lib/transfer.c(181,12): warning: integer constant not in range of enumerated type 'bool' [-Wassign-enum]
  181 |     return CURLE_FAILED_INIT;
      |            ^
../lib/transfer.c(181,12): warning: implicit conversion from enumeration type 'CURLcode' to different enumeration type 'bool' [-Wenum-conversion]
  181 |     return CURLE_FAILED_INIT;
      |     ~~~~~~ ^~~~~~~~~~~~~~~~~
../lib/transfer.c(183,12): warning: integer constant not in range of enumerated type 'bool' [-Wassign-enum]
  183 |     return CURLE_FAILED_INIT;
      |            ^
../lib/transfer.c(183,12): warning: implicit conversion from enumeration type 'CURLcode' to different enumeration type 'bool' [-Wenum-conversion]
  183 |     return CURLE_FAILED_INIT;
      |     ~~~~~~ ^~~~~~~~~~~~~~~~~
```

Follow-up to 35bf766 curl#14253

Closes curl#16170
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature-window A merge of this requires an open feature window HTTP/2 tests

Development

Successfully merging this pull request may close these issues.

2 participants