Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
appinventor-sources
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
appinventor-sources
Commits
df021dfb
Commit
df021dfb
authored
Jan 08, 2018
by
Jeffrey I. Schiller
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ucr'
parents
ed0bfe01
6c4f0ac5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
15 deletions
+27
-15
appinventor/buildserver/src/com/google/appinventor/buildserver/ProjectBuilder.java
...rc/com/google/appinventor/buildserver/ProjectBuilder.java
+1
-1
appinventor/buildserver/src/com/google/appinventor/buildserver/util/AARLibrary.java
...c/com/google/appinventor/buildserver/util/AARLibrary.java
+2
-2
appinventor/components/src/com/google/appinventor/components/runtime/util/NanoHTTPD.java
...google/appinventor/components/runtime/util/NanoHTTPD.java
+24
-12
No files found.
appinventor/buildserver/src/com/google/appinventor/buildserver/ProjectBuilder.java
View file @
df021dfb
...
...
@@ -200,7 +200,7 @@ public final class ProjectBuilder {
// Note (ralph): deleteRecursively has been removed from the guava-11.0.1 lib
// Replacing with deleteDirectory, which is supposed to delete the entire directory.
FileUtils
.
delete
Director
y
(
new
File
(
projectRoot
.
getCanonicalPath
()));
FileUtils
.
delete
Quietl
y
(
new
File
(
projectRoot
.
getCanonicalPath
()));
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
appinventor/buildserver/src/com/google/appinventor/buildserver/util/AARLibrary.java
View file @
df021dfb
...
...
@@ -122,8 +122,8 @@ public class AARLibrary {
*/
public
AARLibrary
(
final
File
aar
)
{
aarPath
=
aar
;
String
temp
=
aar
.
get
AbsolutePath
();
name
=
temp
.
substring
(
temp
.
lastIndexOf
(
'/'
)
,
temp
.
length
()-
4
);
String
temp
=
aar
.
get
Name
();
name
=
temp
.
substring
(
0
,
temp
.
length
()-
4
);
}
public
File
getFile
()
{
...
...
appinventor/components/src/com/google/appinventor/components/runtime/util/NanoHTTPD.java
View file @
df021dfb
...
...
@@ -397,7 +397,18 @@ public class NanoHTTPD
splitbyte
++;
// Write the part of body already read to ByteArrayOutputStream f
ByteArrayOutputStream
f
=
new
ByteArrayOutputStream
();
OutputStream
f
;
if
(
method
.
equalsIgnoreCase
(
"PUT"
)
)
{
File
tmpfile
=
File
.
createTempFile
(
"upload"
,
"bin"
);
tmpfile
.
deleteOnExit
();
f
=
new
FileOutputStream
(
tmpfile
);
files
.
put
(
"content"
,
tmpfile
.
getAbsolutePath
());
}
else
{
f
=
new
ByteArrayOutputStream
();
}
if
(
splitbyte
<
rlen
)
f
.
write
(
buf
,
splitbyte
,
rlen
-
splitbyte
);
// While Firefox sends on the first read all the data fitting
...
...
@@ -421,17 +432,17 @@ public class NanoHTTPD
f
.
write
(
buf
,
0
,
rlen
);
}
// If the method is POST, there may be parameters
// in data section, too, read it:
if
(
method
.
equalsIgnoreCase
(
"POST"
))
{
// Get the raw body as a byte []
byte
[]
fbuf
=
f
.
toByteArray
();
byte
[]
fbuf
=
((
ByteArrayOutputStream
)
f
)
.
toByteArray
();
// Create a BufferedReader for easily reading it as string.
ByteArrayInputStream
bin
=
new
ByteArrayInputStream
(
fbuf
);
BufferedReader
in
=
new
BufferedReader
(
new
InputStreamReader
(
bin
));
// If the method is POST, there may be parameters
// in data section, too, read it:
if
(
method
.
equalsIgnoreCase
(
"POST"
))
{
String
contentType
=
""
;
String
contentTypeHeader
=
header
.
getProperty
(
"content-type"
);
StringTokenizer
st
=
new
StringTokenizer
(
contentTypeHeader
,
"; "
);
...
...
@@ -467,10 +478,12 @@ public class NanoHTTPD
postLine
=
postLine
.
trim
();
decodeParms
(
postLine
,
parms
);
}
in
.
close
();
}
else
if
(
method
.
equalsIgnoreCase
(
"PUT "
)
)
{
f
.
close
();
// Close open file
}
if
(
method
.
equalsIgnoreCase
(
"PUT"
))
files
.
put
(
"content"
,
saveTmpFile
(
fbuf
,
0
,
f
.
size
()));
// Ok, now do the serve()
Response
r
=
serve
(
uri
,
method
,
header
,
parms
,
files
,
mySocket
);
...
...
@@ -479,7 +492,6 @@ public class NanoHTTPD
else
sendResponse
(
r
.
status
,
r
.
mimeType
,
r
.
header
,
r
.
data
);
in
.
close
();
is
.
close
();
}
catch
(
IOException
ioe
)
...
...
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