Bug 30318

Summary: [PATCH] libfetch needs extending or fixing
Product: Base System Reporter: mwm
Component: binAssignee: Dag-Erling Smørgrav <des>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description mwm 2001-09-04 17:40:01 UTC
libfetch is a good start on being a general-purpose URL manipulation
library. The one bit of real functionality missing - at least that I
can see - is something that "undoes" fetchParseURL, allowing clients
to paste parts of a URL together.

A tool to make this facility available from the shell would also be
nice.

The other problem is that the URL parser isn't up to snuff. In
particular, it doesn't handle the mailto scheme. Since fixing that
potentially breaks the behavior described by the manual page, I've not
done anything about it.

There are other things that would be nice to have, like filling in
default port numbers, relative URL handling, and fragment and query
handing. Hower, some architectural decisions need to be made - like
should there be a liburl that libfetch uses - before work starts on
those.

Fix: The attached shar file includes two things. First is a patch for
libfetch that adds - and documents - fetchStrfURL, which does for
struct url what strftime does for struct tm.

The other files are a command - calledj url, as suggested in the
above-named thread - which calls fetchParseURL then fetchStrfURL on
it's argument. It could use some enhancing, but needs to wait more
work on libfetch for that.
How-To-Repeat: 
Read the "Should URL's be pervasive" thread on -hackers.  Better yet,
don't.
Comment 1 dd freebsd_committer freebsd_triage 2001-09-13 12:17:06 UTC
Responsible Changed
From-To: freebsd-bugs->des

Over to maintainer. 
DES: I'm not so sure it's appropriate to turn libfetch into a 
do-it-all-for-you type of thing (and this would be a first step)
Comment 2 Dag-Erling Smørgrav freebsd_committer freebsd_triage 2001-09-13 12:48:09 UTC
State Changed
From-To: open->closed

If you want sprintf(), you know where to find it...