anchor.diff:      ?Debug("OPTIONS", []),
       ok = inet_setopts(SC, CliSock, [{packet, raw}, binary]),
       flush(SC, CliSock, Head#headers.content_length),
  -    _ARG = make_arg(CliSock, Head, Req, GC, SC),
  + %% _ARG = make_arg(CliSock, Head, Req, GC, SC),
       ?Debug("OPTIONS delivering", []),
       deliver_options(CliSock, Req, GC, SC).
   
  -make_arg(CliSock, Head, Req, _GC, SC) ->
  +make_arg(CliSock, Head, Req, _GC, SC, Bin) ->
       ?TC([{record, _GC, gconf}, {record, SC, sconf}]),
  -    #arg{clisock = CliSock,
  -	 headers = Head,
  -	 req = Req,
  -	 opaque = SC#sconf.opaque,
  -	 pid = self(),
  -	 docroot = SC#sconf.docroot}.
  +    ARG = #arg{clisock = CliSock,
  +	       headers = Head,
  +	       req = Req,
  +	       opaque = SC#sconf.opaque,
  +	       pid = self(),
  +	       docroot = SC#sconf.docroot,
  +	       clidata = Bin},
  +    apply(SC#sconf.arg_rewrite_mod, arg_rewrite, [ARG]).
   
   bad_request(CliSock, GC, SC, Req, Head) ->
       ?TC([{record, GC, gconf}, {record, SC, sconf}]),
  
positive.code:     end.
  
  
  split_path(_SC, [$/], _Q, _Comps, []) ->
      %% its a URL that ends with /
      slash;
  split_path(SC, [$/, $/ |Tail], Q, Comps, Part) ->  %% security clause
      split_path(SC, [$/|Tail], Q, Comps, Part);
  split_path(_SC, [$/, $., $., $/ |_], _, _, _) ->  %% security clause
      forbidden;
  split_path(SC, [], Query, Comps, Part) ->
      ret_reg_split(SC, Comps, Part, Query);
  split_path(SC, [$/|Tail], Query, Comps, Part)  when Part /= [] ->
      ?Debug("Tail=~s Part=~s", [Tail,Part]),
      Component = lists:reverse(Part),
      CName = tl(Component),
  
negative.code:     H ++ conc_path(T).
  
  
  
  ret_app_mod(_SC, Path, Mod, PrePath) ->
      #urltype{type = appmod,
  	     data = {Mod, Path},
  	     path = PrePath}.
  
  
  
  %% http://a.b.c/~user URLs
  ret_user_dir(SC, [], "/", Upath) when SC#sconf.tilde_expand == true ->
      ?Debug("UserPart = ~p~n", [Upath]),
      case parse_user_path(SC#sconf.docroot, Upath, []) of
  	{ok, User, Path} ->
  