This repository was archived by the owner on May 15, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +30
-6
lines changed Expand file tree Collapse file tree 4 files changed +30
-6
lines changed Original file line number Diff line number Diff line change
1
+ ##### 1.0.0-beta.5 - 31 July 2018
2
+
3
+ ###### Bug fixes
4
+ - [ #161 ] ( https://github.com/GoogleCloudPlatform/cloud-functions-emulator/issues/161 ) - The emulator behaves differently than the production version with respect to the rawBody property
5
+ - [ #261 ] ( https://github.com/GoogleCloudPlatform/cloud-functions-emulator/pull/261 ) - Update Node.js version warning message
6
+
7
+ ###### Other
8
+ - Updated dependencies
9
+
1
10
##### 1.0.0-beta.4 - 06 March 2018
2
11
3
12
###### Bug fixes
Original file line number Diff line number Diff line change 3
3
# Names are formatted as:
4
4
# name <email>
5
5
#
6
+ Ace Nassri <anassri@google.com>
6
7
Akinori Machino <akinori.machino@icloud.com>
7
8
Jason Dobry <jason.dobry@gmail.com>
8
9
Jason Polites <jason.polites@gmail.com>
10
+ Justin Beckwith <justin.beckwith@gmail.com>
9
11
Kim Vogt <kim.vogt@gmail.com>
10
12
Kris J. Pruden <kpruden@users.noreply.github.com>
11
13
Lauren Long <laurenzlong@users.noreply.github.com>
@@ -15,3 +17,4 @@ Slawek Walkowski <swalkowski@users.noreply.github.com>
15
17
Tim Swast <swast@google.com>
16
18
Tina Liang <tinaliang@google.com>
17
19
aminy <aminy@indicee.com>
20
+ renovate[bot] <renovate[bot]@users.noreply.github.com>
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @google-cloud/functions-emulator" ,
3
3
"description" : " Google Cloud Functions Emulator" ,
4
- "version" : " 1.0.0-beta.4 " ,
4
+ "version" : " 1.0.0-beta.5 " ,
5
5
"license" : " Apache-2.0" ,
6
6
"author" : " Google Inc." ,
7
7
"engines" : {
40
40
]
41
41
},
42
42
"contributors" : [
43
+ " Ace Nassri <anassri@google.com>" ,
43
44
" Akinori Machino <akinori.machino@icloud.com>" ,
44
45
" Jason Dobry <jason.dobry@gmail.com>" ,
45
46
" Jason Polites <jason.polites@gmail.com>" ,
47
+ " Justin Beckwith <justin.beckwith@gmail.com>" ,
46
48
" Kim Vogt <kim.vogt@gmail.com>" ,
47
49
" Kris J. Pruden <kpruden@users.noreply.github.com>" ,
48
50
" Lauren Long <laurenzlong@users.noreply.github.com>" ,
51
53
" Slawek Walkowski <swalkowski@users.noreply.github.com>" ,
52
54
" Tim Swast <swast@google.com>" ,
53
55
" Tina Liang <tinaliang@google.com>" ,
54
- " aminy <aminy@indicee.com>"
56
+ " aminy <aminy@indicee.com>" ,
57
+ " renovate[bot] <renovate[bot]@users.noreply.github.com>"
55
58
],
56
59
"scripts" : {
57
60
"lint" : " semistandard" ,
Original file line number Diff line number Diff line change @@ -88,11 +88,17 @@ function main () {
88
88
req . rawBody = buf ;
89
89
} ;
90
90
91
- const rawBodySavingOptions = {
91
+ const defaultBodySavingOptions = {
92
92
limit : requestLimit ,
93
93
verify : rawBodySaver
94
94
} ;
95
95
96
+ const rawBodySavingOptions = {
97
+ limit : requestLimit ,
98
+ verify : rawBodySaver ,
99
+ type : '*/*'
100
+ } ;
101
+
96
102
// Use extended query string parsing for URL-encoded bodies.
97
103
const urlEncodedOptions = {
98
104
limit : requestLimit ,
@@ -101,11 +107,14 @@ function main () {
101
107
} ;
102
108
103
109
// Parse request body
104
- app . use ( bodyParser . raw ( rawBodySavingOptions ) ) ;
105
- app . use ( bodyParser . json ( rawBodySavingOptions ) ) ;
106
- app . use ( bodyParser . text ( rawBodySavingOptions ) ) ;
110
+ app . use ( bodyParser . json ( defaultBodySavingOptions ) ) ;
111
+ app . use ( bodyParser . text ( defaultBodySavingOptions ) ) ;
107
112
app . use ( bodyParser . urlencoded ( urlEncodedOptions ) ) ;
108
113
114
+ // MUST be last in the list of body parsers as subsequent parsers will be
115
+ // skipped when one is matched.
116
+ app . use ( bodyParser . raw ( rawBodySavingOptions ) ) ;
117
+
109
118
// Never cache
110
119
app . use ( ( req , res , next ) => {
111
120
res . set ( 'Cache-Control' , 'no-cache, no-store, must-revalidate' ) ;
You can’t perform that action at this time.
0 commit comments