mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-03 08:01:25 +08:00
79e38de840
Add the ability to set some additional curlopt values via .daprc (aka .dodsrc). This effects both DAP2 and DAP4 protocols. Related issues: [1] re: esupport: KOZ-821332 [2] re: github issue https://github.com/Unidata/netcdf4-python/issues/836 [3] re: github issue https://github.com/Unidata/netcdf-c/issues/1074 1. CURLOPT_BUFFERSIZE: Relevant to [1]. Allow user to set the read/write buffersizes used by curl. This is done by adding the following to .daprc (aka .dodsrc): HTTP.READ.BUFFERSIZE=n where n is the buffersize in bytes. There is a built-in (to curl) limit of 512k for this value. 2. CURLOPT_TCP_KEEPALIVE (and CURLOPT_TCP_KEEPIDLE and CURLOPT_TCP_KEEPINTVL): Relevant (maybe) to [2] and [3]. Allow the user to turn on KEEPALIVE This is done by adding the following to .daprc (aka .dodsrc): HTTP.KEEPALIVE=on|n/m If the value is "on", then simply enable default KEEPALIVE. If the value is n/m, then enable KEEPALIVE and set KEEPIDLE to n and KEEPINTVL to m.
34 lines
734 B
Bash
34 lines
734 B
Bash
#!/bin/sh
|
|
|
|
# These tests are intended to be run only manually.
|
|
# The idea is to gdb ncdump and check that the CURLOPT flags
|
|
# is being processed correctly.
|
|
# As a rule, you will need to set the breakpoint in
|
|
# ocget_rcproperties
|
|
|
|
if test "x$srcdir" = x ; then srcdir=`pwd`; fi
|
|
. ../test_common.sh
|
|
|
|
# Figure our server; if none, then just stop
|
|
SVC=`${execdir}/findtestserver dap2 dts`
|
|
TESTCASE=test.01
|
|
|
|
if test "x$SVC" = "x" ; then
|
|
echo "WARNING: Cannot locate test server"
|
|
exit
|
|
fi
|
|
|
|
URL="[log]${SVC}/${TESTCASE}"
|
|
|
|
# Create the .daprc file
|
|
rm -f ./.daprc
|
|
echo '# tst_curlopt.sh' > ./.daprc
|
|
echo 'HTTP.READ.BUFFERSIZE=max' >> ./.daprc
|
|
echo 'HTTP.KEEPALIVE=60/60' >> ./.daprc
|
|
gdb --args ${NCDUMP} "${URL}"
|
|
|
|
# cleanup
|
|
rm -f ./.daprc
|
|
|
|
exit
|