Skip to content

Commit

Permalink
2006-01-16 Pierre-Luc Paour <gallery@paour.com> (1.5.1-b10)
Browse files Browse the repository at this point in the history
	* Also look for image caption in TAG_USER_COMMENT
	* Fixed cookie handling for cases where the path contains
	  a URL-encoded character (such as ~). Thanks acherrington.
  • Loading branch information
Pierre-Luc Paour committed Jan 16, 2006
1 parent 0f96efd commit 6c88927
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 18 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,3 +1,9 @@
2006-01-16 Pierre-Luc Paour <gallery@paour.com> (1.5.1-b10)

* Also look for image caption in TAG_USER_COMMENT
* Fixed cookie handling for cases where the path contains
a URL-encoded character (such as ~). Thanks acherrington.

2006-01-05 Pierre-Luc Paour <gallery@paour.com> (1.5.1-b9)

* Japanese translation by Yosuke Suzuki.
Expand Down
6 changes: 6 additions & 0 deletions HTTPClient/Cookie.java
Expand Up @@ -34,6 +34,8 @@

import java.io.Serializable;
import java.net.ProtocolException;
import java.net.URLEncoder;
import java.net.URLDecoder;
import java.util.Date;


Expand Down Expand Up @@ -281,6 +283,10 @@ else if (beg < len && buf[beg] != ',')
else end = Math.min(comma, semic);

String value = set_cookie.substring(beg, end).trim();

if (name.equalsIgnoreCase("path")) {
value = URLDecoder.decode(value);
}
legal &= setAttribute(curr, name, value, set_cookie);

beg = end;
Expand Down
30 changes: 15 additions & 15 deletions com/gallery/GalleryRemote/util/ExifImageUtils.java
Expand Up @@ -74,28 +74,28 @@ public static Date getCreationDate(Directory exifDirectory, Directory iptcDirect
}

public static String getCaption(Directory exifDirectory, Directory iptcDirectory, String filename) {
/* Prefer the EXIF IMAGE_DESCRIPTION tag */
String caption = exifDirectory.getString(ExifDirectory.TAG_IMAGE_DESCRIPTION).trim();

String exifDescription = exifDirectory.getString(ExifDirectory.TAG_IMAGE_DESCRIPTION);

if (exifDescription == null) {
Log.log(Log.LEVEL_TRACE, MODULE, "Picture " + filename + " has no EXIF DESCRIPTION tag");
} else {
Log.log(Log.LEVEL_TRACE, MODULE, "Picture " + filename + " EXIF DESCRIPTION: " + exifDescription);
return exifDescription.trim();
if (caption != null && caption.length() != 0) {
Log.log(Log.LEVEL_TRACE, MODULE, "Picture " + filename + " TAG_IMAGE_DESCRIPTION: " + caption);
return caption.trim();
}

/* If there is no EXIF tag, look for the IPTC TAG_CAPTION one */
caption = exifDirectory.getString(ExifDirectory.TAG_USER_COMMENT).trim();

String iptcDescription = iptcDirectory.getString(IptcDirectory.TAG_CAPTION);
if (caption != null && caption.length() !=0) {
Log.log(Log.LEVEL_TRACE, MODULE, "Picture " + filename + " TAG_USER_COMMENT: " + caption);
return caption.trim();
}

if (iptcDescription == null) {
Log.log(Log.LEVEL_TRACE, MODULE, "Picture " + filename + " has no IPTC DESCRIPTION tag");
} else {
Log.log(Log.LEVEL_TRACE, MODULE, "Picture " + filename + " IPTC DESCRIPTION: " + iptcDescription);
return iptcDescription.trim();
caption = iptcDirectory.getString(IptcDirectory.TAG_CAPTION).trim();

if (caption != null && caption.length() !=0) {
Log.log(Log.LEVEL_TRACE, MODULE, "Picture " + filename + " IPTC DESCRIPTION: " + caption);
return caption.trim();
}

Log.log(Log.LEVEL_TRACE, MODULE, "Picture " + filename + " has no usable EXIF or IPTC info");
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion com/gallery/GalleryRemote/util/ImageUtils.java
Expand Up @@ -862,7 +862,7 @@ public static Dimension getPictureDimension(Picture p) {
// we're on Windows with an abbreviated path: look up IM in the registry
StringBuffer output = new StringBuffer();
int retval = exec("reg query HKLM\\Software\\ImageMagick\\Current /v BinPath", output);
retval = 1;
if (retval == 0) {
Pattern pat = Pattern.compile("^\\s*BinPath\\s*REG_SZ\\s*(.*)", Pattern.MULTILINE | Pattern.CASE_INSENSITIVE);
//Pattern pat = Pattern.compile("BinPath", Pattern.MULTILINE | Pattern.CASE_INSENSITIVE);
Expand Down
4 changes: 2 additions & 2 deletions defaults.properties
Expand Up @@ -308,6 +308,6 @@ updateUrlBeta=http://gallery.sourceforge.net/gallery_remote_version_check_beta.p
#
# --- Do not edit below this line ---
#
version=1.5.1-b9
releaseDate=2006/01/05
version=1.5.1-b10
releaseDate=2006/01/16
aboutText=Gallery Remote\n \n \nA part of the Gallery Open-Source Project\nhttp://gallery.sourceforge.net\n \n \nMaintained by:\n \nPierre-Luc Paour\n \n \nInitial version by Chris Smith\n \n \nContributors:\n \nTim Miller\nDolan Halbrook\nMarkus Cozowicz\nScott Gartner\nAmedeo Paglione\nChris Schwerdt\nSeth Ladd\n \n \nArtwork by Ross A. Reyman\n \n \nBundled software:\n \nImageMagick\nJava look and feel Graphics Repository icons\njpegtran, Guido Vollbeding's version\nMetadataExtractor

0 comments on commit 6c88927

Please sign in to comment.