[patch] Update to libfetch
From: Kelly Yancey (kbyanc_at_posi.net)
Date: 02/22/05
- Previous message: Ruslan Ermilov: "Another bug with same-net same-netmask IP aliases"
- Next in thread: Dag-Erling Smørgrav: "Re: [patch] Update to libfetch"
- Reply: Dag-Erling Smørgrav: "Re: [patch] Update to libfetch"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 21 Feb 2005 15:39:48 -0800 (PST) To: freebsd-net@FreeBSD.org
Attached is a patch to address concerns raised by Pawel Worach with
regards to the recent change to set TCP_NOPUSH when sending HTTP
requests from libfetch. The previous revision also introduced a call
to shutdown(2) to close the write half of the socket in order to force
the queued request to be sent. While this should be perfectly
acceptable behavior for a TCP client, it appears that squid provides a
configuration option to disallow half-closed clients (which Pawel is
currently using). As such, after introducing the shutdown(2) call,
fetch(1) can no longer fetch files via HTTP through such proxies.
To address this issue, the attached patch replaces the call to
shutdown(2) with some socket option fiddling (clearing TCP_NOPUSH and
setting TCP_NODELAY) which does the same job of forcing the client to
write the queued request to the network without closing the write half
of the socket. This feels a bit hackish to me, but gets the job done.
Anyway, I would appreciate any feedback. Thanks,
Kelly
--
Kelly Yancey - kbyanc@{posi.net,FreeBSD.org} - kelly@nttmcl.com
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
- TEXT/PLAIN attachment: fetch-nodelay.diff
- Previous message: Ruslan Ermilov: "Another bug with same-net same-netmask IP aliases"
- Next in thread: Dag-Erling Smørgrav: "Re: [patch] Update to libfetch"
- Reply: Dag-Erling Smørgrav: "Re: [patch] Update to libfetch"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|