Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

curlopt_stream_weight(3) [mojave man page]

CURLOPT_STREAM_WEIGHT(3)				     curl_easy_setopt options					  CURLOPT_STREAM_WEIGHT(3)

NAME
CURLOPT_STREAM_WEIGHT - set numerical stream weight SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_STREAM_WEIGHT, long weight); DESCRIPTION
Set the long weight to a number between 1 and 256. When using HTTP/2, this option sets the individual weight for this particular stream used by the easy handle. Setting and using weights only makes sense and is only usable when doing multiple streams over the same connections, which thus implies that you use CURLMOPT_PIPE- LINING(3). This option can be set during transfer and will then cause the updated weight info get sent to the server the next time a HTTP/2 frame is sent to the server. See section 5.3 of RFC 7540 for protocol details: https://httpwg.github.io/specs/rfc7540.html#StreamPriority Streams with the same parent should be allocated resources proportionally based on their weight. So if you have two streams going, stream A with weight 16 and stream B with weight 32, stream B will get two thirds (32/48) of the available bandwidth (assuming the server can send off the data equally for both streams). DEFAULT
If nothing is set, the HTTP/2 protocol itself will use its own default which is 16. PROTOCOLS
HTTP/2 EXAMPLE
TODO AVAILABILITY
Added in 7.46.0 RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. SEE ALSO
CURLOPT_STREAM_DEPENDS(3), CURLOPT_STREAM_DEPENDS_E(3), CURLOPT_PIPEWAIT(3), CURLMOPT_PIPELINING(3), libcurl 7.54.0 February 03, 2016 CURLOPT_STREAM_WEIGHT(3)

Check Out this Related Man Page

CURLOPT_POSTREDIR(3)					     curl_easy_setopt options					      CURLOPT_POSTREDIR(3)

NAME
CURLOPT_POSTREDIR - how to act on a HTTP POST redirect SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_setopt(CURL *handle, CURLOPT_POSTREDIR, long bitmask); DESCRIPTION
Pass a bitmask to control how libcurl acts on redirects after POSTs that get a 301, 302 or 303 response back. A parameter with bit 0 set (value CURL_REDIR_POST_301) tells the library to respect RFC 7231 (section 6.4.2 to 6.4.4) and not convert POST requests into GET requests when following a 301 redirection. Setting bit 1 (value CURL_REDIR_POST_302) makes libcurl maintain the request method after a 302 redirect whilst setting bit 2 (value CURL_REDIR_POST_303) makes libcurl maintain the request method after a 303 redirect. The value CURL_REDIR_POST_ALL is a convenience define that sets all three bits. The non-RFC behaviour is ubiquitous in web browsers, so the library does the conversion by default to maintain consistency. However, a server may require a POST to remain a POST after such a redirection. This option is meaningful only when setting CURLOPT_FOLLOWLOCATION(3). DEFAULT
0 PROTOCOLS
HTTP(S) EXAMPLE
CURL *curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); /* a silly POST example */ curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "data=true"); /* example.com is redirected, so we tell libcurl to send POST on 301, 302 and 303 HTTP response codes */ curl_easy_setopt(curl, CURLOPT_POSTREDIR, CURL_REDIR_POST_ALL); curl_easy_perform(curl); } AVAILABILITY
Added in 7.17.1. This option was known as CURLOPT_POST301 up to 7.19.0 as it only supported the 301 then. CURL_REDIR_POST_303 was added in 7.26.0. RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. SEE ALSO
CURLOPT_FOLLOWLOCATION(3), CURLOPT_POSTFIELDS(3), libcurl 7.54.0 February 03, 2016 CURLOPT_POSTREDIR(3)
Man Page

5 More Discussions You Might Find Interesting

1. AIX

server specs

what are the commands needed to determine the server specs. memory, space, cpu and others thanx (2 Replies)
Discussion started by: fsmadi
2 Replies

2. IP Networking

File transfer using HTTP

I have Apache running on a Solaris server. Does anyone know how I go about using HTTP for a file transfer ( or I guess more properly termed in HTTP as a document transfer ) ? I have a requirement that restricts my file transfer options to HTTP only ! Is there any changes I need to make to the... (10 Replies)
Discussion started by: jimthompson
10 Replies

3. Shell Programming and Scripting

sed command

I have file like that name is M1 address is ...... tall is ..... weight is ..... name is M2 address is ...... tall is ..... weight is ..... and same type of data for many persons (M3, M4,...). I want to use sed or awk to get the weight and tall for every person , so the output file... (3 Replies)
Discussion started by: snow
3 Replies

4. Shell Programming and Scripting

string deletion, variable contents, fixed delimiters

Hi, I need to mass delete the following string(s) from my files weight=100, However the '100' is variable e.g Current: ---------------- moretext=bar, weight=100, moreinfo=blah extrastuff=hi, weight=9999, extrainfo=foo Desired: ------------------ moretext=bar, moreinfo=blah... (2 Replies)
Discussion started by: rebelbuttmunch
2 Replies

5. Infrastructure Monitoring

Light-weight alternative to `df` (without SNMP)

Overview: I'm looking for a way to get usage data for all mount points (UFS,VxFS & NFS) on a Solaris system. I'm starting with `df` but would like to find something that might be more light-weight. Background: Using SNMP is not an option in this case, instead I need to use basic built-in... (2 Replies)
Discussion started by: seg
2 Replies