Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
f9e732b5
authored
2013-11-26 11:16:22 +0800
by
astaxie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix param to params
1 parent
ae2e25f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
router.go
router.go
View file @
f9e732b
...
...
@@ -581,7 +581,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
}
}
context
.
Input
.
Param
=
params
context
.
Input
.
Param
s
=
params
if
runrouter
!=
nil
{
if
r
.
Method
==
"POST"
{
...
...
@@ -766,7 +766,7 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
lastindex
:=
strings
.
LastIndex
(
requestPath
,
"/"
)
lastsub
:=
requestPath
[
lastindex
+
1
:
]
if
subindex
:=
strings
.
LastIndex
(
lastsub
,
"."
);
subindex
!=
-
1
{
context
.
Input
.
Param
[
":ext"
]
=
lastsub
[
subindex
+
1
:
]
context
.
Input
.
Param
s
[
":ext"
]
=
lastsub
[
subindex
+
1
:
]
r
.
URL
.
Query
()
.
Add
(
":ext"
,
lastsub
[
subindex
+
1
:
])
r
.
URL
.
RawQuery
=
r
.
URL
.
Query
()
.
Encode
()
requestPath
=
requestPath
[
:
len
(
requestPath
)
-
len
(
lastsub
[
subindex
:
])]
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment