anchor.diff:  	http_uri:parse("http://2010:836B:4179::836B:4179/foobar.html"), 
   
       %% ipv4
  -    {http,[],"127.0.0.1",80,"/foobar.html",[]} =
  +    {ok, {http,[],"127.0.0.1",80,"/foobar.html",[]}} =
   	http_uri:parse("http://127.0.0.1/foobar.html"),
       
       %% host
  -    {http,[],"localhost",8888,"/foobar.html",[]} = 
  +    {ok, {http,[],"localhost",8888,"/foobar.html",[]}} = 
   	http_uri:parse("http://localhost:8888/foobar.html"),
       
       %% Userinfo
  -    {http,"nisse:foobar","localhost",8888,"/foobar.html",[]} =
  +    {ok, {http,"nisse:foobar","localhost",8888,"/foobar.html",[]}} =
   	http_uri:parse("http://nisse:foobar@localhost:8888/foobar.html"),
       
       %% Scheme error
  
positive.code:     [];
  parse_url(Config) when is_list(Config) ->
      %% ipv6
      {http,[],"2010:836B:4179::836B:4179",80,"/foobar.html",[]} = 
  	http_uri:parse("http://[2010:836B:4179::836B:4179]/foobar.html"),
      {http,[],"[2010:836B:4179::836B:4179]",80,"/foobar.html",[]} = 
  	http_uri:parse("http://[2010:836B:4179::836B:4179]/foobar.html", 
  		       [{ipv6_host_with_brackets, true}]),
      {http,[],"2010:836B:4179::836B:4179",80,"/foobar.html",[]} = 
  	http_uri:parse("http://[2010:836B:4179::836B:4179]/foobar.html", 
  		       [{ipv6_host_with_brackets, false}]),
      {http,[],"2010:836B:4179::836B:4179",80,"/foobar.html",[]} = 
  	http_uri:parse("http://[2010:836B:4179::836B:4179]/foobar.html", 
  		       [{foo, false}]),
      {error,
  
negative.code:     Search3 = "?hl=en&q=%foo",
      URI3    = GoogleSearch ++ Search3, 
  
      Verify1 = 
  	fun({http, [], ?GOOGLE, 80, "/search", _}) -> ok;
  	   (_) -> error
  	end,
      Verify2 = Verify1, 
      Verify3 = Verify1, 
      verify_uri(URI1, Verify1), 
      verify_uri(URI2, Verify2), 
      verify_uri(URI3, Verify3), 
      ok.
  
  verify_uri(URI, Verify) ->
      case http_uri:parse(URI) of
  	{ok, ParsedURI} ->
  	    case Verify(ParsedURI) of
  		ok ->
  		    ok;
  		error ->
  		    Reason = {unexpected_parse_result, URI, ParsedURI}, 
  		    ERROR  = {error, Reason}, 
  		    throw(ERROR)
  	    end;
  	{error, _} = ERROR ->
  	    throw(ERROR)
      end.
  
  
  %%-------------------------------------------------------------------------
  