Bug 29695

Summary: Fetch - When no URL scheme given, fetch guesses wrong scheme.
Product: Base System Reporter: Craig Harvey <charvey>
Component: miscAssignee: Dag-Erling Smørgrav <des>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Craig Harvey 2001-08-14 08:10:01 UTC
In src/usr.bin.fetch/fetch.c, the fetch() function incorrectly guesses 
the URL scheme.

Fix: 

When attempting to "guess" the scheme, put a '!' in front of the 
strncasecmp() calls.  The function returns 0 if the comparison is 
successful, thus the else if statement fails when it should succeed.
How-To-Repeat: Call fetch with a schemeless URL.
Comment 1 dd freebsd_committer freebsd_triage 2001-08-14 08:30:36 UTC
Responsible Changed
From-To: freebsd-bugs->des

Over to maintainer. 
DES: this is the bug you fixed in rev. 1.32.  It'd be nice to see the fix 
in 4.4.  If you don't have time to MFC it, let me know and I can do it for 
you.
Comment 2 dd freebsd_committer freebsd_triage 2001-08-16 03:04:23 UTC
State Changed
From-To: open->closed

Fixed, thanks!