[OpenWrt-Devel] uclient-fetch & SSL WAS:Re: DD: CONFIG_BUSYBOX_DEFAULT_WGET is not set
Arjen de Korte
arjen+openwrt at de-korte.org
Sat Jan 23 15:35:09 EST 2016
Citeren Felix Fietkau <nbd at openwrt.org>:
> On 2016-01-23 20:54, Arjen de Korte wrote:
>> Citeren Felix Fietkau <nbd at openwrt.org>:
>>> On 2016-01-23 01:25, Felix Fietkau wrote:
>>>> On 2016-01-23 00:45, Arjen de Korte wrote:
>>>>> It also behaves differently with the http://dyn.dns.he.net servers
>>>>> (returning a Connection failure, despite also returning a result). See
>>>>> # /bin/uclient-fetch -O-
>>>>> Connecting to 2001:470:0:193::3000:443
>>>>> Writing to stdout
>>>>> nochg 126.96.36.199Connection error: Connection failed
>>>>> I'm not too concerned about the first, but the latter is a bit
>>>>> inconvenient. I suspect the HE servers close the connection
>>>>> immediately after sending the result and that this is not expected.
>>>> I'll make an account and look into that soon.
>>> Figured it out. It was a mix of two things:
>>> - Needed to change ustream-ssl to treat SSL close notification as EOF
>>> - The he.net HTTP server sends \n as linebreak instead of \r\n
>>> I've changed the code to deal with both issues, it should work now, as
>>> of r48463. Please test.
>> The above mentioned problems seem to be fixed. I can now successfully
>> send the update to the HE servers. I do notice another issue however.
>> When using the -O <file> option, the output file is not truncated
>> before writing data. This is undesireable if the file already contains
>> data and less than the existing data is written. After the new data is
>> written, the remaining old data is still there. A strategically placed
>> O_TRUNC flag will probably fix this.
> Should be fixed in r48465
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel