aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www/Main.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/juick/http/www/Main.java')
-rw-r--r--src/java/com/juick/http/www/Main.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/java/com/juick/http/www/Main.java b/src/java/com/juick/http/www/Main.java
index fa4f9850..7564664a 100644
--- a/src/java/com/juick/http/www/Main.java
+++ b/src/java/com/juick/http/www/Main.java
@@ -28,6 +28,7 @@ import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.Properties;
import javax.servlet.ServletException;
+import javax.servlet.annotation.MultipartConfig;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
@@ -39,6 +40,7 @@ import ru.sape.Sape;
* @author Ugnich Anton
*/
@WebServlet(name = "Main", urlPatterns = {"/"})
+@MultipartConfig
public class Main extends HttpServlet implements Stream.StreamListener {
Connection sql;
@@ -270,6 +272,12 @@ public class Main extends HttpServlet implements Stream.StreamListener {
if (uri.equals("/post")) {
pagesNewMessage.doPostNewMessage(sql, request, response);
} else if (uri.equals("/pm/send")) {
+ com.juick.User visitor = Utils.getVisitorUser(sql, request, response);
+ if (visitor != null) {
+ pm.doPostPM(sql, request, response, xmpp, visitor);
+ } else {
+ response.sendError(403);
+ }
} else if (uri.equals("/login")) {
login.doPostLogin(sql, request, response);
} else if (uri.equals("/signup")) {