Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 42c9637

Browse filesBrowse files
authored
Merge pull request revel#1218 from notzippy/docs
Some small bug fixes / improvements
2 parents f5c9db9 + c57df47 commit 42c9637
Copy full SHA for 42c9637

File tree

5 files changed

+17
-6
lines changed
Filter options

5 files changed

+17
-6
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Revel Framework
22

3-
[![Build Status](https://secure.travis-ci.org/revel/revel.svg?branch=master)](http://travis-ci.org/revel/revel) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
3+
[![Build Status](https://secure.travis-ci.org/revel/revel.svg?branch=master)](http://travis-ci.org/revel/revel)
4+
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
5+
[![Go Report Card](https://goreportcard.com/badge/github.com/revel/revel)](https://goreportcard.com/report/github.com/revel/revel)
46

57
A high productivity, full-stack web framework for the [Go language](http://www.golang.org).
68

‎http.go

Copy file name to clipboardExpand all lines: http.go
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type Request struct {
3131
Method string
3232
RemoteAddr string
3333
Host string
34-
// DEPRECATED use request methods
34+
// URL request path from the server (built)
3535
URL *url.URL
3636
// DEPRECATED use GetForm()
3737
Form url.Values
@@ -80,7 +80,7 @@ func (req *Request) SetRequest(r ServerRequest) {
8080
req.ServerHeader.Server = h.(ServerHeader)
8181
}
8282

83-
req.URL, _ = url.Parse(req.GetRequestURI())
83+
req.URL,_ = req.GetValue(HTTP_URL).(*url.URL)
8484
req.ContentType = ResolveContentType(req)
8585
req.Format = ResolveFormat(req)
8686
req.AcceptLanguages = ResolveAcceptLanguage(req)

‎router.go

Copy file name to clipboardExpand all lines: router.go
+9-3Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,11 @@ func splitActionPath(actionPathData *ActionPathData, actionPath string, useCache
354354
}
355355
action = actionSplit[1]
356356
} else {
357-
WARN.Printf("Invalid action path %s ", actionPath)
357+
foundPaths := ""
358+
for path:=range actionPathCacheMap {
359+
foundPaths += path +","
360+
}
361+
WARN.Printf("Invalid action path %s found paths %s", actionPath, foundPaths)
358362
found = false
359363
}
360364

@@ -671,8 +675,10 @@ func (router *Router) Reverse(action string, argValues map[string]string) (ad *A
671675
if el == "" || (el[0] != ':' && el[0] != '*') {
672676
continue
673677
}
674-
675-
val, ok := argValues[el[1:]]
678+
val, ok := pathData.FixedParamsByName[el[1:]]
679+
if !ok {
680+
val, ok = argValues[el[1:]]
681+
}
676682
if !ok {
677683
val = "<nil>"
678684
ERROR.Print("revel/router: reverse route missing route arg ", el[1:])

‎server-engine.go

Copy file name to clipboardExpand all lines: server-engine.go
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const (
3333
HTTP_REQUEST_URI = iota + 1000
3434
HTTP_REMOTE_ADDR = iota + 1000
3535
HTTP_HOST = iota + 1000
36+
HTTP_URL = iota + 1000
3637
HTTP_SERVER_HEADER = iota + 1000
3738
HTTP_STREAM_WRITER = iota + 1000
3839
HTTP_WRITER = ENGINE_WRITER

‎server_adapter_go.go

Copy file name to clipboardExpand all lines: server_adapter_go.go
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ func (r *GoRequest) Get(key int) (value interface{}, err error) {
211211
value = r.Original.URL.Path
212212
case HTTP_HOST:
213213
value = r.Original.Host
214+
case HTTP_URL:
215+
value = r.Original.URL
214216
case HTTP_BODY:
215217
value = r.Original.Body
216218
default:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.