From owner-freebsd-doc@FreeBSD.ORG Sat Jan 2 15:10:04 2010 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB51B1065694 for ; Sat, 2 Jan 2010 15:10:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C9D498FC16 for ; Sat, 2 Jan 2010 15:10:04 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id o02FA4jV088132 for ; Sat, 2 Jan 2010 15:10:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id o02FA4H0088131; Sat, 2 Jan 2010 15:10:04 GMT (envelope-from gnats) Resent-Date: Sat, 2 Jan 2010 15:10:04 GMT Resent-Message-Id: <201001021510.o02FA4H0088131@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Yasir Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEB65106568B for ; Sat, 2 Jan 2010 15:04:14 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id AE7078FC12 for ; Sat, 2 Jan 2010 15:04:14 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o02F4Ewa016710 for ; Sat, 2 Jan 2010 15:04:14 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o02F4EAU016709; Sat, 2 Jan 2010 15:04:14 GMT (envelope-from nobody) Message-Id: <201001021504.o02F4EAU016709@www.freebsd.org> Date: Sat, 2 Jan 2010 15:04:14 GMT From: Yasir To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: docs/142243: Netcat (nc(1)) manual mistake X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Jan 2010 15:10:05 -0000 >Number: 142243 >Category: docs >Synopsis: Netcat (nc(1)) manual mistake >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Sat Jan 02 15:10:04 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Yasir >Release: 7.1-RELEASE >Organization: >Environment: FreeBSD conductor.loc 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan 1 14:37:25 UTC 2009 root@logan.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 >Description: man 1 nc states in TALKING TO SERVERS section: [..] For example, to retrieve the home page of a web site: $ echo -n "GET / HTTP/1.0\r\n\r\n" | nc host.example.com 80 [..] But this kind of request often returns either nothing or something irrelevant, maybe due to a strong server implementation (e.g. meets RFCs). >How-To-Repeat: According to man one could do the following: $ echo "GET / HTTP/1.0\r\n\r\n" | nc example.com 80 But nothing is returned upon request. Another attempt which also fails: $ echo "HEAD / HTTP/1.0\r\n\r\n" | nc ya.ru 80 400 Bad Request

400 Bad Request


nginx
>Fix: There should have been used printf(1) instead. Man should be corrected, namely, sed 's/echo -n/printf/' >Release-Note: >Audit-Trail: >Unformatted: