Skip to content

Commit 48ec67e

Browse files
committed
fix up httpclient example, working on windows export problem
1 parent 72bd225 commit 48ec67e

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

app/src/processing/mode/java/JavaBuild.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,8 +1519,12 @@ protected void addDataFolder(ZipOutputStream zos) throws IOException {
15191519
int offset = sketch.getFolder().getAbsolutePath().length() + 1;
15201520
for (String path : dataFiles) {
15211521
if (Base.isWindows()) {
1522+
System.out.println("base is windows");
15221523
//dataFiles[i] = dataFiles[i].replace('\\', '/');
15231524
path = path.replace('\\', '/');
1525+
System.out.println("new path is " + path);
1526+
} else {
1527+
System.out.println("base NOT windows");
15241528
}
15251529
//File dataFile = new File(dataFiles[i]);
15261530
File dataFile = new File(path);

java/libraries/net/examples/HTTPClient/HTTPClient.pde

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
* HTTP Client.
33
*
44
* Starts a network client that connects to a server on port 80,
5-
* sends an HTTP 1.1 GET request, and prints the results.
5+
* sends an HTTP 1.0 GET request, and prints the results.
6+
*
7+
* Note that this code is not necessary for simple HTTP GET request:
8+
* Simply calling loadStrings("http://www.processing.org") would do
9+
* the same thing as (and more efficiently than) this example.
10+
* This example is for people who might want to do something more
11+
* complicated later.
612
*/
713

814

@@ -16,8 +22,8 @@ void setup() {
1622
background(50);
1723
fill(200);
1824
c = new Client(this, "www.processing.org", 80); // Connect to server on port 80
19-
c.write("GET / HTTP/1.1\n"); // Use the HTTP "GET" command to ask for a Web page
20-
c.write("Host: my_domain_name.com\n\n"); // Be polite and say who we are
25+
c.write("GET / HTTP/1.0\r\n"); // Use the HTTP "GET" command to ask for a Web page
26+
c.write("\r\n");
2127
}
2228

2329
void draw() {

todo.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ X library imports are broken (using pretty name not folder name)
99
X http://code.google.com/p/processing/issues/detail?id=637
1010
X 1.5 can't find java sdk -- patch shell script?
1111
X http://code.google.com/p/processing/issues/detail?id=633
12+
X Obsolete Network > HTTPClient sketch
13+
X http://code.google.com/p/processing/issues/detail?id=655
14+
15+
_ Applets exported by PDE don't find data folder in 1.5 (philho)
16+
_ http://code.google.com/p/processing/issues/detail?id=666
17+
18+
_ add deployJava.js to local sketch folder (causes internet requirement)
19+
_ http://code.google.com/p/processing/issues/detail?id=650
1220

1321
_ libraries in java tabs (separate .java files) are reported missing
1422
_ need to scan the .java files for imports that need to be included

0 commit comments

Comments
 (0)