Permalink
Browse files

""

git-svn-id: https://erlyaws.svn.sourceforge.net/svnroot/erlyaws/trunk/yaws@73 9fbdc01b-0d2c-0410-bfb7-fb27d70d8b52
  • Loading branch information...
1 parent c457013 commit e86d1403284945bc87c5141ef9a16b059d15d37b @klacke committed Jun 10, 2002
Showing with 47 additions and 1,250 deletions.
  1. 0 ebin/.empty
  2. +0 −1,180 ebin/erl_crash.dump
  3. +0 −8 ebin/ewww.app
  4. +0 −8 ebin/yaws.app
  5. +7 −0 src/yaws_api.erl
  6. +5 −3 src/yaws_config.erl
  7. +0 −4 src/yaws_ls.erl
  8. +18 −0 src/yaws_server.erl
  9. +1 −1 vsn.mk
  10. +3 −0 www/history.yaws
  11. +2 −46 www/post.yaws
  12. +10 −0 www/static.html
  13. +1 −0 www/todo.yaws
View
No changes.
View
Oops, something went wrong.
View
@@ -1,8 +0,0 @@
-{application,ewww,
- [{description,"E WWW server"},
- {vsn,""},
- {modules,[ewww, ewww_app, bassert, ewww_config, ewww_server, ewww_sup]},
- {registered, []},
- {mod,{ewww_app,[]}},
- {env, []},
- {applications,[kernel,stdlib]}]}.
View
@@ -1,8 +0,0 @@
-{application,yaws,
- [{description,"yaws WWW server"},
- {vsn,"0.42"},
- {modules,[yaws, yaws_app, yaws_config, yaws_server, yaws_sup, yaws_api, yaws_log, yaws_ls, yaws_debug, yaws_compile, yaws_ctl, yaws_ssl, yaws_vsn]},
- {registered, []},
- {mod,{yaws_app,[]}},
- {env, []},
- {applications,[kernel,stdlib]}]}.
View
@@ -293,4 +293,11 @@ find_cookie_val3([H|T], Ack) ->
+url_decode([$%, Hi, Lo | Tail]) ->
+ Hex = yaws:hex_to_integer([Hi, Lo]),
+ [Hex | url_decode(Tail)];
+url_decode([H|T]) ->
+ [H |url_decode(T)];
+url_decode([]) ->
+ [].
View
@@ -72,8 +72,10 @@ exists(F) ->
validate_cs(GC, Cs) ->
+ ?Debug("Cs ~p~n", [Cs]),
L = lists:map(fun(SC) -> {{SC#sconf.listen, SC#sconf.port}, SC} end,Cs),
L2 = lists:map(fun(X) -> element(2, X) end, lists:sort(L)),
+ ?Debug("L2 ~p~n", [L2]),
L3 = arrange(L2, start, [], []),
?Debug("Arrange: ~p", [L3]),
case validate_groups(L3) of
@@ -127,14 +129,14 @@ arrange([C|Tail], start, [], B) ->
arrange([], _, [], B) ->
B;
arrange([], _, A, B) ->
- [A|B];
+ [A | B];
arrange([C1|Tail], {in, C0}, A, B) ->
if
C1#sconf.listen == C0#sconf.listen,
C1#sconf.port == C0#sconf.port ->
arrange(Tail, {in, C0}, [C1|A], B);
true ->
- arrange(Tail, {in, C1}, [], [A|B])
+ arrange(Tail, {in, C1}, [C1], [A|B])
end.
@@ -145,7 +147,7 @@ make_default_gconf() ->
ebin_dir = [filename:join([Y, "examples/ebin"])],
include_dir = [filename:join([Y, "examples/include"])],
logdir = ".",
- yaws = "Yaws 0.2"}.
+ yaws = "Yaws " ++ yaws_vsn:version()}.
make_default_sconf() ->
View
@@ -61,10 +61,6 @@ list_head() ->
"<hr> \n".
-% produce a string like
-% <img SRC="/icons/layout.gif" ALT="[ ]"> <a HREF="iSD_SSL_3.0.1_beta1_Application_Guide_011206.pdf">iSD_SSL_3.0.1_beta1_..&gt;</a> 17-Dec-2001 19:06 1.3M
-
-
file_entry({ok, FI}, DirName, Name) ->
?Debug("file_entry(~p) ", [Name]),
Ext = filename:extension(Name),
View
@@ -1571,6 +1571,24 @@ ret_reg_split(DR, Comps, RevFile, Query) ->
mime=Mime, q=Query};
{ok, FI} when FI#file_info.type == directory ->
maybe_return_dir(DR, lists:flatten(Dir) ++ File);
+ {error, enoent} ->
+ %% kind of hackish, defer url decode
+ Dir2 = lists:flatmap(fun(X) -> yaws_api:url_decode(X) end, Dir),
+ File2 = yaws_api:url_decode(File),
+ L2 = [DR, Dir2, File2],
+ case prim_file:read_file_info(L) of
+ {ok, FI} when FI#file_info.type == regular ->
+ {X, Mime} = suffix_type(RevFile),
+ #urltype{type=X,
+ finfo=FI,
+ dir = Dir2,
+ fullpath = lists:flatten(L2),
+ mime=Mime, q=Query};
+ {ok, FI} when FI#file_info.type == directory ->
+ maybe_return_dir(DR, lists:flatten(Dir2) ++ File2);
+ Err ->
+ #urltype{type=error, data=Err}
+ end;
Err ->
#urltype{type=error, data=Err}
end.
View
2 vsn.mk
@@ -1 +1 @@
-YAWS_VSN=0.42
+YAWS_VSN=0.43
View
@@ -12,6 +12,9 @@ out(A) ->
<table border="2">
+<tr><td> Jun 10, use prim_file instead of file: calls, fix a bug
+with iso 8859 chars in urls, virthost bug </td></tr>
+
<tr><td> May 26, added SSL support 0.40 </td> </tr>
<tr><td> Mar 29, fixed a bug in the log wrapping which restarted the server</td></tr>
View
@@ -39,52 +39,8 @@ out(A) ->
{ok,L}.
</erl>
-<p>Above, we got all the <tt>Value</tt> arguments as strings, however
-it is also possible to let the parser coerce data types of the posted data.
-
-<p>In this specific case we know the expected type of the arguments posted from
-the form. If <a href="form.yaws">back</a> back to the forms page, we can see that
-the arguments are
-<ol>
-<li> string (the "lang" field)
-<li> checkbox (the "imperative" field)
-<li> integer (the "tabs" field)
-<li> checkbox (the "os1" field)
-<li> checkbox (the "os2" field)
-<li> checkbox (the "os3" field)
-<li> string (the "other" field)
-<li> string (the "contact" field)
-</ol>
-
-<p>Since we know the types we expect in the form, we can indicate that to
-the <tt>parse_post_data/2</tt> function as in the following code:
-
-
-<pre>
-out(A) ->
- Spec = [string, checkbox, integer,
- checkbox, checkbox, checkbox,
- string, string],
- L = f("&lt;pre>~n clidata: ~p~n &lt;/pre>",
- [yaws_api:parse_post_data(A#arg.clidata, Spec)]),
- {ok,L}.
-</pre>
-
-<p>
-
-
-This will produce the following output:
-
-<erl>
-out(A) ->
- Spec = [string, checkbox, int,
- checkbox, checkbox, checkbox,
- string, string],
- L = f("~n<pre>~n clidata: ~p~n </pre>",
- [yaws_api:parse_post_data(A#arg.clidata, Spec)]),
- {ok,L}.
-</erl>
-
+<p> It is up to the yaws programmer to parse this
+structure and extract the data from it.
</HTML>
View
@@ -1,5 +1,15 @@
<html>
+
+<head>
+ <meta name="keywords" content="Hyber">
+ <title>Hyber</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<IMG SRC="/xxåäöxx.jpg" HEIGHT=40 WIDTH="400" ALT="HYBER LOGO">
+
+
<p> no content
</html>
View
@@ -11,6 +11,7 @@ out(A) ->
<ul>
+<li> clusters
<li> handle the If-..... headers
<li> generate Etag for static content
<li> handle Range header

0 comments on commit e86d140

Please sign in to comment.