Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
715c2c43
Commit
715c2c43
authored
Aug 20, 2016
by
tnextday
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
efbde1ee
' into develop
parents
9224cd3e
efbde1ee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
input.go
context/input.go
+4
-1
swagger.go
swagger/swagger.go
+1
-0
No files found.
context/input.go
View file @
715c2c43
...
...
@@ -337,13 +337,16 @@ func (input *BeegoInput) Cookie(key string) string {
}
// Session returns current session item value by a given key.
// if non-existed, return
empty string
.
// if non-existed, return
nil
.
func
(
input
*
BeegoInput
)
Session
(
key
interface
{})
interface
{}
{
return
input
.
CruSession
.
Get
(
key
)
}
// CopyBody returns the raw request body data as bytes.
func
(
input
*
BeegoInput
)
CopyBody
(
MaxMemory
int64
)
[]
byte
{
if
input
.
Context
.
Request
.
Body
==
nil
{
return
[]
byte
{}
}
safe
:=
&
io
.
LimitedReader
{
R
:
input
.
Context
.
Request
.
Body
,
N
:
MaxMemory
}
requestbody
,
_
:=
ioutil
.
ReadAll
(
safe
)
input
.
Context
.
Request
.
Body
.
Close
()
...
...
swagger/swagger.go
View file @
715c2c43
...
...
@@ -117,6 +117,7 @@ type Schema struct {
Description
string
`json:"description,omitempty"`
Required
[]
string
`json:"required,omitempty"`
Type
string
`json:"type,omitempty"`
Items
*
Propertie
`json:"items,omitempty"`
Properties
map
[
string
]
Propertie
`json:"properties,omitempty"`
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment