GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Support OPTIONS requests. · WebThingsIO/webthing-java@66496f5

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • CHANGELOG.md
  • pom.xml
  • src/main/java/org/mozilla/iot/webthing
    • WebThingServer.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎CHANGELOG.md‎

Copy file name to clipboardExpand all lines: CHANGELOG.md
+6-1Lines changed: 6 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## [Unreleased]
44

5+
## [0.12.1] - 2020-03-27
6+
### Added
7+
- Support OPTIONS requests to allow for CORS.
8+
59
## [0.12.0] - 2019-07-12
610
### Changed
711
- Things now use `title` rather than `name`.
@@ -20,7 +24,8 @@
2024
### Changed
2125
- Property, Action, and Event description now use `links` rather than `href`. - [Spec PR](https://github.com/mozilla-iot/wot/pull/119)
2226

23-
[Unreleased]: https://github.com/mozilla-iot/webthing-java/compare/v0.12.0...HEAD
27+
[Unreleased]: https://github.com/mozilla-iot/webthing-java/compare/v0.12.1...HEAD
28+
[0.12.1]: https://github.com/mozilla-iot/webthing-java/compare/v0.12.0...v0.12.1
2429
[0.12.0]: https://github.com/mozilla-iot/webthing-java/compare/v0.11.0...v0.12.0
2530
[0.11.0]: https://github.com/mozilla-iot/webthing-java/compare/v0.10.0...v0.11.0
2631
[0.10.0]: https://github.com/mozilla-iot/webthing-java/compare/v0.9.1...v0.10.0
Collapse file

‎pom.xml‎

Copy file name to clipboardExpand all lines: pom.xml
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>org.mozilla.iot</groupId>
88
<artifactId>webthing</artifactId>
9-
<version>0.12.0</version>
9+
<version>0.12.1</version>
1010

1111
<name>WebThing</name>
1212
<description>Implementation of an HTTP Web Thing.</description>
@@ -73,7 +73,7 @@
7373
<dependency>
7474
<groupId>org.json</groupId>
7575
<artifactId>json</artifactId>
76-
<version>20180813</version>
76+
<version>20190722</version>
7777
</dependency>
7878
<dependency>
7979
<groupId>org.nanohttpd</groupId>
@@ -98,7 +98,7 @@
9898
<dependency>
9999
<groupId>com.github.everit-org.json-schema</groupId>
100100
<artifactId>org.everit.json.schema</artifactId>
101-
<version>1.11.1</version>
101+
<version>1.12.1</version>
102102
</dependency>
103103
<dependency>
104104
<groupId>junit</groupId>
Collapse file

‎src/main/java/org/mozilla/iot/webthing/WebThingServer.java‎

Copy file name to clipboardExpand all lines: src/main/java/org/mozilla/iot/webthing/WebThingServer.java
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,12 @@ public Response other(String method,
510510
UriResource uriResource,
511511
Map<String, String> urlParams,
512512
IHTTPSession session) {
513+
if (method.equals("OPTIONS")) {
514+
return corsResponse(NanoHTTPD.newFixedLengthResponse(Response.Status.NO_CONTENT,
515+
null,
516+
null));
517+
}
518+
513519
return corsResponse(NanoHTTPD.newFixedLengthResponse(Response.Status.METHOD_NOT_ALLOWED,
514520
null,
515521
null));
@@ -757,7 +763,7 @@ public void run() {
757763
link.put("rel", "alternate");
758764
link.put("href", wsHref);
759765
description.getJSONArray("links").put(link);
760-
766+
761767
String base = String.format("%s://%s%s",
762768
this.isSecure(uriResource) ?
763769
"https" :

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.