From owner-freebsd-hackers Fri Oct 2 00:30:36 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA13332 for freebsd-hackers-outgoing; Fri, 2 Oct 1998 00:30:36 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from david.siemens.de (david.siemens.de [192.35.17.14]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA13324 for ; Fri, 2 Oct 1998 00:30:31 -0700 (PDT) (envelope-from andre.albsmeier@mchp.siemens.de) X-Envelope-Sender-Is: andre.albsmeier@mchp.siemens.de (at relayer david.siemens.de) Received: from mail.siemens.de (salomon.siemens.de [139.23.33.13]) by david.siemens.de (8.9.1a/8.9.1) with ESMTP id JAA17506 for ; Fri, 2 Oct 1998 09:30:07 +0200 (MET DST) Received: from curry.mchp.siemens.de (daemon@curry.mchp.siemens.de [146.180.31.23]) by mail.siemens.de (8.9.1a/8.9.1) with ESMTP id JAA21650 for ; Fri, 2 Oct 1998 09:30:08 +0200 (MET DST) Received: (from daemon@localhost) by curry.mchp.siemens.de (8.8.8/8.8.8) id JAA16001 for ; Fri, 2 Oct 1998 09:30:09 +0200 (CEST) From: Andre Albsmeier Message-Id: <199810020730.JAA05992@internal> Subject: Only "fetch -b" works, what am I doing wrong? To: hackers@FreeBSD.ORG Date: Fri, 2 Oct 1998 09:30:01 +0200 (CEST) X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I have written a small programm that serves http requests. When using fetch I have to use "fetch -b" because without -b fetch complains with: "fetch: empty reply from myserver.org" While digging around in http.c, I found out that -b works around a linux bug. One of the correspondig lines is: if (sendmsg(s, &msg, fs->fs_linux_bug ? 0 : MSG_EOF) < 0) { This means, my small http server works when setting flags (of sendmsg) to 0. I assume, the correct way would be to set MSG_EOF but somehow my http server doesn't work with it. I do the ususal stuff, 1. socket() 2. bind() 3. listen() 4. accept() Can anybody tell me what I am doing wrong? Am I missing some setsockopt or anything? Thanks a lot, -Andre To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message