Skip to content

Commit 6201923

Browse files
committed
performance
1 parent 9ea33b5 commit 6201923

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ end
153153

154154
```julia
155155
server = Merly.app("Path","load") #example: ("D:\\EXAMPLE\\src","*") defauld: (pwd(),"")
156-
@page "/" File("Index.html", res)
156+
@page "/" File("Index.html", r)
157157

158158
```
159159
```clojure

src/Merly.jl

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ using HttpServer,
1010
export app, @page, @route, GET,POST,PUT,DELETE,Get,Post,Put,Delete
1111
|(x::ASCIIString, y::ASCIIString)="$x|$y"
1212

13-
r=Dict()
13+
1414
q=Dict()
1515

1616
POST="POST"
@@ -21,7 +21,7 @@ b=[]
2121
root=pwd()
2222
nfmessage=""
2323
#metodof=1
24-
exten="\"\""
24+
exten="\"\""::AbstractString
2525

2626
type Q
2727
query
@@ -213,7 +213,6 @@ end
213213

214214
function process(element::Merly.Pag,q,res::HttpCommon.Response,req::HttpCommon.Request)
215215

216-
217216
if !(ismatch(Regex("GET"),req.method))
218217
#println("interpetando los Bytes de req.data como caracteres: ")
219218
global cors
@@ -275,8 +274,8 @@ global root
275274
global exten
276275
global q
277276
global cors
278-
cors=false
279-
root=r
277+
cors=false::Bool
278+
root=r::AbstractString
280279
q=Q("","","")
281280
if root[end]=='/'
282281
root=root[1:end-1]
@@ -291,7 +290,7 @@ if length(load)>0
291290
if load=="*"
292291
WebServer(root)
293292
else
294-
exten=load
293+
exten=load::AbstractString
295294
WebServer(root)
296295
end
297296
end

0 commit comments

Comments
 (0)