From owner-freebsd-questions Wed Sep 30 01:08:12 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA20362 for freebsd-questions-outgoing; Wed, 30 Sep 1998 01:08:12 -0700 (PDT) (envelope-from owner-freebsd-questions@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 BAA20324 for ; Wed, 30 Sep 1998 01:08:07 -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 KAA11304 for ; Wed, 30 Sep 1998 10:07:51 +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 KAA20095 for ; Wed, 30 Sep 1998 10:07:41 +0200 (MET DST) Received: (from daemon@localhost) by curry.mchp.siemens.de (8.8.8/8.8.8) id KAA25347 for ; Wed, 30 Sep 1998 10:07:43 +0200 (CEST) From: Andre Albsmeier Message-Id: <199809300807.KAA03417@internal> Subject: Only "fetch -b" works, what am I doing wrong? To: freebsd-questions@FreeBSD.ORG Date: Wed, 30 Sep 1998 10:07:40 +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-questions@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-questions" in the body of the message